From 1c3118bb1b2ba72e4512f297175f40aa27ef92f2 Mon Sep 17 00:00:00 2001 From: Christophe Simonis <> Date: Tue, 11 May 2010 18:46:43 +0530 Subject: [PATCH] =?UTF-8?q?[FIX]=C2=A0(5.0=20-=206.0)account:=C2=A0avoid?= =?UTF-8?q?=C2=A0a=C2=A0traceback=C2=A0if=C2=A0credit/debit/balance=C2=A0s?= =?UTF-8?q?um=C2=A0can=C2=A0be=C2=A0computed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bzr revid: vra@tinyerp.com-20100511131643-3cp4gx58ootw6cqo --- addons/account/account.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/account/account.py b/addons/account/account.py index ac34ddef58f..5c17b3cd84f 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -252,8 +252,9 @@ class account_account(osv.osv): if current.child_id: sums[current.id][fn] += sum(sums[child.id][fn] for child in current.child_id) res = {} + null_result = dict((fn, 0.0) for fn in field_names) for id in ids: - res[id] = sums[id] + res[id] = sums.get(id, null_result) return res def _get_company_currency(self, cr, uid, ids, field_name, arg, context={}):