Browse Source

Merge pull request #438 from hbrunn/10.0-account_financial_report_horizontal-profit_loss

[ADD] [account_financial_report_horizontal] special treatment for profit&loss reports
pull/455/head
Stefan Rijnhart (Opener) 6 years ago
committed by GitHub
parent
commit
2cb6c1345f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      account_financial_report_horizontal/models/account_financial_report.py

8
account_financial_report_horizontal/models/account_financial_report.py

@ -41,6 +41,14 @@ class AccountFinancialReport(models.Model):
for report in reports: for report in reports:
if not report.parent_id: if not report.parent_id:
result += report result += report
# special treatment for profit and loss if they have the
# standard configuration type='other'
elif side == 'right' and report == self.env.ref(
'account.account_financial_report_income0'
) or side == 'left' and report == self.env.ref(
'account.account_financial_report_expense0'
):
last_bad_report = report
# don't check children if we already checked the parent # don't check children if we already checked the parent
elif report.parent_id == last_bad_report: elif report.parent_id == last_bad_report:
continue continue

Loading…
Cancel
Save