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: