Merge lp:~openerp-dev/openobject-addons/trunk-bug-708073-uco into lp:openobject-addons

Proposed by Ujjvala Collins
Status: Rejected
Rejected by: Olivier Dony (Odoo)
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-708073-uco
Merge into: lp:openobject-addons
Diff against target: 19 lines (+4/-1)
1 file modified
analytic/analytic.py (+4/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-708073-uco
Reviewer Review Type Date Requested Status
Mustufa Rangwala (Open ERP) (community) Approve
qdp (OpenERP) Pending
Review via email: mp+67331@code.launchpad.net

Description of the change

[FIX] account:
-----------------------
* Fixed analytic account tree view showing wrong sum for debit, credit, balance and quantity fields. (lp:708073)

To post a comment you must log in.
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) :
review: Approve
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

A different fix was merged in trunk at revision 5049 revid:<email address hidden>, hence marking as rejected.
Thanks

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'analytic/analytic.py'
2--- analytic/analytic.py 2011-07-01 23:41:24 +0000
3+++ analytic/analytic.py 2011-09-15 10:52:26 +0000
4@@ -30,11 +30,14 @@
5 _description = 'Analytic Account'
6
7 def _compute_level_tree(self, cr, uid, ids, child_ids, res, field_names, context=None):
8- def recursive_computation(account_id, res):
9+ def recursive_computation(account_id, res, repeated_account_ids=[]):
10 currency_obj = self.pool.get('res.currency')
11 account = self.browse(cr, uid, account_id)
12 for son in account.child_ids:
13+ if son.id in repeated_account_ids:
14+ continue
15 res = recursive_computation(son.id, res)
16+ repeated_account_ids.append(son.id)
17 for field in field_names:
18 if account.currency_id.id == son.currency_id.id or field=='quantity':
19 res[account.id][field] += res[son.id][field]

Subscribers

People subscribed via source and target branches

to all changes: