[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 <smetl@users.noreply.github.com>
This commit is contained in:
oco-odoo
2021-10-12 12:56:55 +00:00
parent 394e24396b
commit 26c2c705e4
2 changed files with 1 additions and 3 deletions
@@ -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')
@@ -75,7 +75,6 @@
<group>
<field name="tax_report_id" invisible="1"/>
<field name="name"/>
<field name="tax_report_line_id"/>
<field name="tax_report_country_id"/>
<field name="foreign_vat_fiscal_position_id"/>
</group>