[FIX] account_financial_report: Fix error when generating reports

Some reports crash if account move line implicated are Sections lines or Notes lines in an invoice
This commit is contained in:
Ernesto Tejeda
2020-04-09 12:37:55 -04:00
committed by chaule97
parent e23bfa9487
commit db9f316980
19 changed files with 7421 additions and 18394 deletions

View File

@@ -329,7 +329,11 @@ class GeneralLedgerReport(models.AbstractModel):
analytic_tag_ids,
cost_center_ids,
):
domain = [("date", ">=", date_from), ("date", "<=", date_to)]
domain = [
("display_type", "=", False),
("date", ">=", date_from),
("date", "<=", date_to),
]
if account_ids:
domain += [("account_id", "in", account_ids)]
if company_id: