[FIX] account: tags form view: make country readonly only when necessary
https://github.com/odoo/odoo/pull/71872 made country_id readonly in every circumstance. This made it impossible to create an account.account.tag targetting taxes from scratch in the UI. We only want to prevent edition of this field when the tag has been generated by a tax.report.line. closes odoo/odoo#73142 X-original-commit: 8f0ae54cd24e9a6299d86c47ed37aea2a7fa4ad8 Signed-off-by: Laurent Smet <smetl@users.noreply.github.com> Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
<field name="name"/>
|
||||
<field name="applicability"/>
|
||||
<field name="tax_negate" readonly="1" attrs="{'invisible': [('applicability', '!=', 'taxes')]}"/>
|
||||
<field name="country_id" readonly="1" options="{'no_open': True, 'no_create': True}" attrs="{'invisible': [('applicability', '!=', 'taxes')]}"/>
|
||||
<field name="country_id" options="{'no_open': True, 'no_create': True}" attrs="{'invisible': [('applicability', '!=', 'taxes')], 'readonly': [('tax_report_line_ids', '!=', [])]}"/>
|
||||
<field name="tax_report_line_ids" readonly="1" attrs="{'invisible': [('applicability', '!=', 'taxes')]}"/>
|
||||
</group>
|
||||
</sheet>
|
||||
|
||||
Reference in New Issue
Block a user