[FIX] purchase*: remove readonly param on account fields

Product template "property_account_expense_id" and "property_account_creditor_price_difference" fields must stay editable in cases even if not "can be puchased".
Since it being readonly is trivial, better leave it writeable instead of implementing cross module readonly logic.

closes odoo/odoo#150601

Task: 3695677
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
This commit is contained in:
jbw-odoo
2024-02-13 08:30:13 +00:00
parent aba8f73aa8
commit 197bb9c394
2 changed files with 1 additions and 4 deletions
-3
View File
@@ -88,9 +88,6 @@
<field name="model">product.template</field>
<field name="inherit_id" ref="account.product_template_form_view"/>
<field name="arch" type="xml">
<field name="property_account_expense_id" position="attributes">
<attribute name="readonly">purchase_ok == 0</attribute>
</field>
<field name='supplier_taxes_id' position="replace" >
<field name="supplier_taxes_id" colspan="2" widget="many2many_tags" readonly="purchase_ok == 0" context="{'default_type_tax_use':'purchase'}"/>
</field>
@@ -19,7 +19,7 @@
<field name="inherit_id" ref="account.product_template_form_view"/>
<field name="arch" type="xml">
<field name="property_account_expense_id" position="after">
<field name="property_account_creditor_price_difference" domain="[('deprecated','=',False)]" readonly="purchase_ok == 0" groups="account.group_account_readonly"/>
<field name="property_account_creditor_price_difference" domain="[('deprecated','=',False)]" groups="account.group_account_readonly"/>
</field>
</field>
</record>