Criptomart/red-supermercados-coop#5 add purchase_invoice_subtotal_taxes
This commit is contained in:
parent
9daf707f40
commit
18f98defeb
7 changed files with 199 additions and 0 deletions
31
purchase_invoice_subtotal_taxes/views/account_move_view.xml
Normal file
31
purchase_invoice_subtotal_taxes/views/account_move_view.xml
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
|
||||
<!-- Make both price_subtotal and price_total always visible as optional columns -->
|
||||
<record id="view_move_form_subtotal_taxes" model="ir.ui.view">
|
||||
<field name="name">account.move.form.subtotal.taxes</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_form" />
|
||||
<field name="arch" type="xml">
|
||||
<!-- Remove group restriction from price_subtotal -->
|
||||
<xpath
|
||||
expr="//field[@name='invoice_line_ids']//tree//field[@name='price_subtotal']"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute name="groups"></attribute>
|
||||
<attribute name="optional">show</attribute>
|
||||
<attribute name="string">Subtotal (No Tax)</attribute>
|
||||
</xpath>
|
||||
<!-- Remove group restriction from price_total -->
|
||||
<xpath
|
||||
expr="//field[@name='invoice_line_ids']//tree//field[@name='price_total']"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute name="groups"></attribute>
|
||||
<attribute name="optional">show</attribute>
|
||||
<attribute name="string">Subtotal (Tax Incl.)</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
|
||||
<!-- Make price_total visible as optional column in purchase order lines -->
|
||||
<record id="purchase_order_form_subtotal_taxes" model="ir.ui.view">
|
||||
<field name="name">purchase.order.form.subtotal.taxes</field>
|
||||
<field name="model">purchase.order</field>
|
||||
<field name="inherit_id" ref="purchase.purchase_order_form" />
|
||||
<field name="arch" type="xml">
|
||||
<!-- Make price_total (Subtotal with tax) visible and optional -->
|
||||
<xpath
|
||||
expr="//field[@name='order_line']//tree//field[@name='price_total']"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute name="invisible">0</attribute>
|
||||
<attribute name="optional">hide</attribute>
|
||||
<attribute name="string">Subtotal (Tax Incl.)</attribute>
|
||||
</xpath>
|
||||
<!-- Make price_subtotal (Subtotal without tax) optional -->
|
||||
<xpath
|
||||
expr="//field[@name='order_line']//tree//field[@name='price_subtotal']"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute name="optional">show</attribute>
|
||||
<attribute name="string">Subtotal (No Tax)</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue