[FIX] account: reports: fix exigibility of child reports

When a report was set to only accept tax exigible items (typically for the generic tax report), its children did not inherit this behavior by default. Because of that, the localized tax reports and OSS reports didn't filter the items properly.

closes odoo/odoo#104611

X-original-commit: 547c00c221606af8b385fab347a34edb15f773cb
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
This commit is contained in:
oco-odoo
2022-10-31 13:39:58 +01:00
parent b92082d494
commit 9c7ebd9476
+4 -1
View File
@@ -32,7 +32,10 @@ class AccountReport(models.Model):
variant_report_ids = fields.One2many(string="Variants", comodel_name='account.report', inverse_name='root_report_id')
chart_template_id = fields.Many2one(string="Chart of Accounts", comodel_name='account.chart.template')
country_id = fields.Many2one(string="Country", comodel_name='res.country')
only_tax_exigible = fields.Boolean(string="Only Tax Exigible Lines")
only_tax_exigible = fields.Boolean(
string="Only Tax Exigible Lines",
compute=lambda x: x._compute_report_option_filter('only_tax_exigible'), readonly=False, store=True, depends=['root_report_id'],
)
availability_condition = fields.Selection(
string="Availability",
selection=[('country', "Country Matches"), ('coa', "Chart of Accounts Matches"), ('always', "Always")],