Merge lp:~unifield-team/unifield-wm/jfb-wm-utp-732-727 into lp:unifield-wm

Proposed by jftempo
Status: Merged
Merged at revision: 1768
Proposed branch: lp:~unifield-team/unifield-wm/jfb-wm-utp-732-727
Merge into: lp:unifield-wm
Diff against target: 46 lines (+11/-2)
1 file modified
analytic_distribution/wizard/analytic_distribution_wizard.py (+11/-2)
To merge this branch: bzr merge lp:~unifield-team/unifield-wm/jfb-wm-utp-732-727
Reviewer Review Type Date Requested Status
UniField Dev Team Pending
Review via email: mp+184316@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'analytic_distribution/wizard/analytic_distribution_wizard.py'
2--- analytic_distribution/wizard/analytic_distribution_wizard.py 2013-08-28 07:39:30 +0000
3+++ analytic_distribution/wizard/analytic_distribution_wizard.py 2013-09-06 14:28:03 +0000
4@@ -943,8 +943,12 @@
5 """
6 if not context:
7 context = {}
8+
9 if isinstance(ids, (int, long)):
10 ids = [ids]
11+ o2m_toreload = {}
12+ if context.get('from_list_grid'):
13+ o2m_toreload['o2m_refresh'] = context['from_list_grid']
14 for wiz in self.browse(cr, uid, ids, context=context):
15 # Update cost center lines
16 if not self.update_cost_center_lines(cr, uid, wiz.id, context=context):
17@@ -1035,7 +1039,7 @@
18 # Update analytic lines
19 self.update_analytic_lines(cr, uid, ids, context=context)
20
21- return_wiz = {'type': 'ir.actions.act_window_close'}
22+ return_wiz = dict(type='ir.actions.act_window_close', **o2m_toreload)
23 if context.get("from_cash_return_analytic_dist"):
24 # If the wizard was called from the cash return line, the perform some actions before returning back to the caller wizard
25 wizard_name = context.get('from')
26@@ -1166,6 +1170,10 @@
27 context = {}
28 if isinstance(ids, (int, long)):
29 ids = [ids]
30+
31+ o2m_toreload = {}
32+ if context.get('from_list_grid'):
33+ o2m_toreload['o2m_refresh'] = context['from_list_grid']
34 # Retrieve some values to verify if we come from a direct invoice
35 wiz = self.browse(cr, uid, ids, context=context)[0]
36 if wiz and (wiz.direct_invoice_id or wiz.direct_invoice_line_id):
37@@ -1194,7 +1202,8 @@
38 }
39 elif wiz.from_direct_inv:
40 return self.pool.get('account.bank.statement.line').button_open_invoice(cr, uid, [wiz.from_direct_inv.id], context)
41- return {'type' : 'ir.actions.act_window_close'}
42+
43+ return dict(type='ir.actions.act_window_close', **o2m_toreload)
44
45 def update_analytic_lines(self, cr, uid, ids, context=None):
46 """

Subscribers

People subscribed via source and target branches