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
=== modified file 'analytic/analytic.py'
--- analytic/analytic.py 2011-07-01 23:41:24 +0000
+++ analytic/analytic.py 2011-09-15 10:52:26 +0000
@@ -30,11 +30,14 @@
30 _description = 'Analytic Account'30 _description = 'Analytic Account'
3131
32 def _compute_level_tree(self, cr, uid, ids, child_ids, res, field_names, context=None):32 def _compute_level_tree(self, cr, uid, ids, child_ids, res, field_names, context=None):
33 def recursive_computation(account_id, res):33 def recursive_computation(account_id, res, repeated_account_ids=[]):
34 currency_obj = self.pool.get('res.currency')34 currency_obj = self.pool.get('res.currency')
35 account = self.browse(cr, uid, account_id)35 account = self.browse(cr, uid, account_id)
36 for son in account.child_ids:36 for son in account.child_ids:
37 if son.id in repeated_account_ids:
38 continue
37 res = recursive_computation(son.id, res)39 res = recursive_computation(son.id, res)
40 repeated_account_ids.append(son.id)
38 for field in field_names:41 for field in field_names:
39 if account.currency_id.id == son.currency_id.id or field=='quantity':42 if account.currency_id.id == son.currency_id.id or field=='quantity':
40 res[account.id][field] += res[son.id][field]43 res[account.id][field] += res[son.id][field]

Subscribers

People subscribed via source and target branches

to all changes: