Criptomart/red-supermercados-coop#17 add account_invoice_triple_discount_readonly: fix write discount2 and dicount3 columns. Make discount (total) readonly

This commit is contained in:
Luis 2025-12-04 14:01:50 +01:00
parent 7df39dbda8
commit 5c213a3d6a
9 changed files with 215 additions and 0 deletions

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!-- Make discount field readonly in invoice lines -->
<record id="invoice_triple_discount_readonly" model="ir.ui.view">
<field name="name">account.invoice.triple.discount.readonly</field>
<field name="model">account.move</field>
<field
name="inherit_id"
ref="account_invoice_triple_discount.invoice_triple_discount_form_view"
/>
<field name="arch" type="xml">
<xpath
expr="//field[@name='invoice_line_ids']//tree//field[@name='discount']"
position="attributes"
>
<attribute name="readonly">1</attribute>
</xpath>
<xpath
expr="//field[@name='invoice_line_ids']//form//field[@name='discount']"
position="attributes"
>
<attribute name="readonly">1</attribute>
</xpath>
</field>
</record>
</odoo>