From 9a5a5f5dbb4e8131aa4efdfa063fd08dbeaca68a Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Thu, 1 Sep 2011 13:41:23 +0200 Subject: [PATCH] [FIX] account, low level reports: avoid to print accounts if there is no account_ids linked to a low.level.report bzr revid: qdp-launchpad@openerp.com-20110901114123-qo654qllg0tcgqc5 --- addons/account/report/account_low_level_report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/report/account_low_level_report.py b/addons/account/report/account_low_level_report.py index 1fec5557c3f..08c196892a5 100644 --- a/addons/account/report/account_low_level_report.py +++ b/addons/account/report/account_low_level_report.py @@ -63,7 +63,7 @@ class report_account_common(report_sxw.rml_parse, common_report_header): if data['form']['enable_filter']: vals['balance_cmp'] = self.pool.get('account.low.level.report').browse(self.cr, self.uid, report.id, context=data['form']['comparison_context']).balance lines.append(vals) - if report.type == 'accounts' and report.display_detail: + if report.type == 'accounts' and report.display_detail and report.account_ids: account_ids = account_obj._get_children_and_consol(self.cr, self.uid, [x.id for x in report.account_ids]) for account in account_obj.browse(self.cr, self.uid, account_ids, context=data['form']['used_context']): if account.type != 'view':