From 9c7ebd947632c8c2968626a05be4d3ddcf6d4194 Mon Sep 17 00:00:00 2001 From: oco-odoo Date: Mon, 31 Oct 2022 09:10:39 +0000 Subject: [PATCH] [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) --- addons/account/models/account_report.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/account/models/account_report.py b/addons/account/models/account_report.py index 554329e2e5c..f6a4a1ce988 100644 --- a/addons/account/models/account_report.py +++ b/addons/account/models/account_report.py @@ -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")],