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:
parent
7df39dbda8
commit
5c213a3d6a
9 changed files with 215 additions and 0 deletions
|
|
@ -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>
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
|
||||
<!-- Make discount field readonly in supplier info form view -->
|
||||
<record model="ir.ui.view" id="product_supplierinfo_form_view_readonly_discount">
|
||||
<field name="model">product.supplierinfo</field>
|
||||
<field
|
||||
name="inherit_id"
|
||||
ref="purchase_triple_discount.product_supplierinfo_form_view"
|
||||
/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='discount']" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Make discount field readonly in supplier info tree view -->
|
||||
<record model="ir.ui.view" id="product_supplierinfo_tree_view_readonly_discount">
|
||||
<field name="model">product.supplierinfo</field>
|
||||
<field
|
||||
name="inherit_id"
|
||||
ref="purchase_triple_discount.product_supplierinfo_tree_view"
|
||||
/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='discount']" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
|
||||
<!-- Make discount field readonly in purchase order lines -->
|
||||
<record id="purchase_order_triple_discount_readonly" model="ir.ui.view">
|
||||
<field name="name">purchase.order.triple.discount.readonly</field>
|
||||
<field name="model">purchase.order</field>
|
||||
<field
|
||||
name="inherit_id"
|
||||
ref="purchase_triple_discount.purchase_order_triple_discount_form_view"
|
||||
/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath
|
||||
expr="//field[@name='order_line']//tree//field[@name='discount']"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute name="readonly">1</attribute>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="//field[@name='order_line']//form//field[@name='discount']"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute name="readonly">1</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
|
||||
<!-- Make default_supplierinfo_discount readonly in partner form view -->
|
||||
<record model="ir.ui.view" id="res_partner_form_view_readonly_discount">
|
||||
<field name="model">res.partner</field>
|
||||
<field
|
||||
name="inherit_id"
|
||||
ref="purchase_triple_discount.res_partner_form_view"
|
||||
/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="default_supplierinfo_discount" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue