[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
This commit is contained in:
Quentin (OpenERP) 2011-09-01 13:41:23 +02:00
parent 2ee86778ef
commit 9a5a5f5dbb
1 changed files with 1 additions and 1 deletions

View File

@ -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':