From 9e999d9bfd96e8a1465617f68c6ca92bbe0f210d Mon Sep 17 00:00:00 2001 From: Luc De Meyer <> Date: Tue, 12 Jun 2012 11:52:37 +0530 Subject: [PATCH 1/2] [FIX] account: Financial Reports prints balance as -0.0 instead of 0.0 for report entries configured as 'Reverse balance sign' in case balance equals to 0.00: (Maintenance Case : 575716) bzr revid: rgo@tinyerp.com-20120612062237-ncvgufr6hcqvauf8 --- addons/account/report/account_financial_report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/report/account_financial_report.py b/addons/account/report/account_financial_report.py index 6e0c8b95e1a..4126964217b 100644 --- a/addons/account/report/account_financial_report.py +++ b/addons/account/report/account_financial_report.py @@ -56,7 +56,7 @@ class report_account_common(report_sxw.rml_parse, common_report_header): for report in self.pool.get('account.financial.report').browse(self.cr, self.uid, ids2, context=data['form']['used_context']): vals = { 'name': report.name, - 'balance': report.balance * report.sign, + 'balance': report.balance != 0 and report.balance * report.sign or report.balance, 'type': 'report', 'level': bool(report.style_overwrite) and report.style_overwrite or report.level, 'account_type': report.type =='sum' and 'view' or False, #used to underline the financial report balances From 5cdcb7f332ae1665a2a937fa39c1879e3564cfd8 Mon Sep 17 00:00:00 2001 From: Xavier ALT Date: Tue, 9 Oct 2012 11:47:28 +0200 Subject: [PATCH 2/2] [FIX] account: force account.financial.report balance of *zero* to be displayed positively bzr revid: xal@openerp.com-20121009094728-61p8ul1dsgp1wqqa --- addons/account/report/account_financial_report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/report/account_financial_report.py b/addons/account/report/account_financial_report.py index 4126964217b..4690c8651c0 100644 --- a/addons/account/report/account_financial_report.py +++ b/addons/account/report/account_financial_report.py @@ -56,7 +56,7 @@ class report_account_common(report_sxw.rml_parse, common_report_header): for report in self.pool.get('account.financial.report').browse(self.cr, self.uid, ids2, context=data['form']['used_context']): vals = { 'name': report.name, - 'balance': report.balance != 0 and report.balance * report.sign or report.balance, + 'balance': report.balance * report.sign or 0.0, 'type': 'report', 'level': bool(report.style_overwrite) and report.style_overwrite or report.level, 'account_type': report.type =='sum' and 'view' or False, #used to underline the financial report balances