From aa44246fe45b457ec814385eacb83a12e1485e34 Mon Sep 17 00:00:00 2001 From: "ARA (OpenERP)" Date: Tue, 4 Jan 2011 11:21:12 +0530 Subject: [PATCH] [FIX]account: general ledger lp bug: https://launchpad.net/bugs/656378 fixed bzr revid: ara@tinyerp.com-20110104055112-wnqayojs4db8igmr --- addons/account/report/account_general_ledger.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/account/report/account_general_ledger.py b/addons/account/report/account_general_ledger.py index b904aba298f..d712b984d88 100755 --- a/addons/account/report/account_general_ledger.py +++ b/addons/account/report/account_general_ledger.py @@ -104,6 +104,8 @@ class general_ledger(report_sxw.rml_parse, common_report_header): def get_children_accounts(self, account): res = [] ids_acc = self.pool.get('account.account')._get_children_and_consol(self.cr, self.uid, account.id) + currency_obj = self.pool.get('res.currency') + currency = account.currency_id and account.currency_id or account.company_id.currency_id for child_account in self.pool.get('account.account').browse(self.cr, self.uid, ids_acc, context=self.context): sql = """ SELECT count(id) @@ -119,7 +121,7 @@ class general_ledger(report_sxw.rml_parse, common_report_header): res.append(child_account) elif self.display_account == 'bal_solde': if child_account.type != 'view' and num_entry <> 0: - if ( sold_account <> 0.0): + if currency_obj.is_zero(self.cr, self.uid, currency, sold_account) != 0: res.append(child_account) else: res.append(child_account)