From dac4f6fe28f288bdda3086231f6e089677fdf11d Mon Sep 17 00:00:00 2001 From: Noviat <> Date: Thu, 5 May 2011 16:43:40 +0200 Subject: [PATCH] [FIX] account: fixed _sum() on account.tax.code object. Thanks Noviat for the patch bzr revid: qdp-launchpad@openerp.com-20110505144340-azftlojg69zbo2sc --- addons/account/account.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index 2b7c1a8e21d..0260c3fee5c 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1561,14 +1561,15 @@ class account_tax_code(osv.osv): (parent_ids,) + where_params) res=dict(cr.fetchall()) obj_precision = self.pool.get('decimal.precision') + res2 = {} for record in self.browse(cr, uid, ids, context=context): def _rec_get(record): amount = res.get(record.id, 0.0) for rec in record.child_ids: amount += _rec_get(rec) * rec.sign return amount - res[record.id] = round(_rec_get(record), obj_precision.precision_get(cr, uid, 'Account')) - return res + res2[record.id] = round(_rec_get(record), obj_precision.precision_get(cr, uid, 'Account')) + return res2 def _sum_year(self, cr, uid, ids, name, args, context=None): if context is None: