From 26c2c705e4dc80d3061672bc6c1b3f053fef94cb Mon Sep 17 00:00:00 2001 From: oco-odoo Date: Mon, 4 Oct 2021 12:32:20 +0000 Subject: [PATCH] [FIX] account: carryover lines: improve view - allow editing the date of a carryover line manually - don't display the tax report line the carryover line is linked to anymore, as the user goes through this line to open the carryover line anyway, and it shouldn't be editable. - also remove a domain that made no sense on carryover lines: pointing to a related field depending on the field defining the domain Manual forward-port of https://github.com/odoo/odoo/pull/77718 closes odoo/odoo#78213 Signed-off-by: Laurent Smet --- addons/account/models/account_tax_carryover_line.py | 3 +-- addons/account/views/account_tax_report_views.xml | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/account/models/account_tax_carryover_line.py b/addons/account/models/account_tax_carryover_line.py index 307a155c4db..d7229238ceb 100644 --- a/addons/account/models/account_tax_carryover_line.py +++ b/addons/account/models/account_tax_carryover_line.py @@ -9,11 +9,10 @@ class AccountTaxCarryoverLine(models.Model): name = fields.Char(required=True) amount = fields.Float(required=True, default=0.0) - date = fields.Date(required=True, default=fields.Date.context_today, readonly=True) + date = fields.Date(required=True, default=fields.Date.context_today) tax_report_line_id = fields.Many2one( comodel_name='account.tax.report.line', string="Tax report line", - domain="[('report_id', '=', tax_report_id)]", ) tax_report_id = fields.Many2one(related='tax_report_line_id.report_id') tax_report_country_id = fields.Many2one(related='tax_report_id.country_id') diff --git a/addons/account/views/account_tax_report_views.xml b/addons/account/views/account_tax_report_views.xml index 45ca4233a6f..5c36cc448e8 100644 --- a/addons/account/views/account_tax_report_views.xml +++ b/addons/account/views/account_tax_report_views.xml @@ -75,7 +75,6 @@ -