Use separate XML files for views
This commit is contained in:
parent
74116dddf7
commit
9d33543185
79
sale.xml
79
sale.xml
|
@ -6,97 +6,28 @@ The COPYRIGHT file at the top level of this repository contains the full copyrig
|
|||
<record model="ir.ui.view" id="sale_view_form">
|
||||
<field name="model">sale.sale</field>
|
||||
<field name="inherit" ref="sale.sale_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<![CDATA[
|
||||
<data>
|
||||
<xpath
|
||||
expr="/form/notebook/page[@id="sale"]/group[@id="amount_buttons"]/field[@name="total_amount"]"
|
||||
position="after">
|
||||
<newline/>
|
||||
<label name="margin" xalign="1.0" xexpand="1"/>
|
||||
<field name="margin" xalign="1.0" xexpand="0"/>
|
||||
</xpath>
|
||||
</data>
|
||||
]]>
|
||||
</field>
|
||||
<field name="name">sale_form</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="sale_view_tree">
|
||||
<field name="model">sale.sale</field>
|
||||
<field name="inherit" ref="sale.sale_view_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<![CDATA[
|
||||
<data>
|
||||
<xpath
|
||||
expr="/tree/field[@name="total_amount"]"
|
||||
position="after">
|
||||
<field name="margin"/>
|
||||
</xpath>
|
||||
</data>
|
||||
]]>
|
||||
</field>
|
||||
<field name="name">sale_tree</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="sale_line_view_form">
|
||||
<field name="model">sale.line</field>
|
||||
<field name="inherit" ref="sale.sale_line_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<![CDATA[
|
||||
<data>
|
||||
<xpath
|
||||
expr="/form/notebook/page/label[@name="unit_price"]"
|
||||
position="before">
|
||||
<label name="cost_price"/>
|
||||
<field name="cost_price"/>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="/form/notebook/page/field[@name="amount"]"
|
||||
position="after">
|
||||
<label name="margin"/>
|
||||
<field name="margin"/>
|
||||
</xpath>
|
||||
</data>
|
||||
]]>
|
||||
</field>
|
||||
<field name="name">sale_line_form</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="sale_line_view_tree_sequence">
|
||||
<field name="model">sale.line</field>
|
||||
<field name="inherit" ref="sale.sale_line_view_tree_sequence"/>
|
||||
<field name="arch" type="xml">
|
||||
<![CDATA[
|
||||
<data>
|
||||
<xpath
|
||||
expr="/tree/field[@name="unit_price"]"
|
||||
position="before">
|
||||
<field name="cost_price"/>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="/tree/field[@name="amount"]"
|
||||
position="after">
|
||||
<field name="margin"/>
|
||||
</xpath>
|
||||
</data>
|
||||
]]>
|
||||
</field>
|
||||
<field name="name">sale_line_tree_sequence</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="sale_line_view_tree">
|
||||
<field name="model">sale.line</field>
|
||||
<field name="inherit" ref="sale.sale_line_view_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<![CDATA[
|
||||
<data>
|
||||
<xpath
|
||||
expr="/tree/field[@name="unit_price"]"
|
||||
position="before">
|
||||
<field name="cost_price"/>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="/tree/field[@name="amount"]"
|
||||
position="after">
|
||||
<field name="margin"/>
|
||||
</xpath>
|
||||
</data>
|
||||
]]>
|
||||
</field>
|
||||
<field name="name">sale_line_tree</field>
|
||||
</record>
|
||||
</data>
|
||||
</tryton>
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part of sale_margin module for Tryton.
|
||||
The COPYRIGHT file at the top level of this repository contains the full
|
||||
copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath
|
||||
expr="/form/notebook/page[@id="sale"]/group[@id="amount_buttons"]/field[@name="total_amount"]"
|
||||
position="after">
|
||||
<newline/>
|
||||
<label name="margin" xalign="1.0" xexpand="1"/>
|
||||
<field name="margin" xalign="1.0" xexpand="0"/>
|
||||
</xpath>
|
||||
</data>
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part of sale_margin module for Tryton.
|
||||
The COPYRIGHT file at the top level of this repository contains the full
|
||||
copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath
|
||||
expr="/form/notebook/page/label[@name="unit_price"]"
|
||||
position="before">
|
||||
<label name="cost_price"/>
|
||||
<field name="cost_price"/>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="/form/notebook/page/field[@name="amount"]"
|
||||
position="after">
|
||||
<label name="margin"/>
|
||||
<field name="margin"/>
|
||||
</xpath>
|
||||
</data>
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part of sale_margin module for Tryton.
|
||||
The COPYRIGHT file at the top level of this repository contains the full
|
||||
copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath
|
||||
expr="/tree/field[@name="unit_price"]"
|
||||
position="before">
|
||||
<field name="cost_price"/>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="/tree/field[@name="amount"]"
|
||||
position="after">
|
||||
<field name="margin"/>
|
||||
</xpath>
|
||||
</data>
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part of sale_margin module for Tryton.
|
||||
The COPYRIGHT file at the top level of this repository contains the full
|
||||
copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath
|
||||
expr="/tree/field[@name="unit_price"]"
|
||||
position="before">
|
||||
<field name="cost_price"/>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="/tree/field[@name="amount"]"
|
||||
position="after">
|
||||
<field name="margin"/>
|
||||
</xpath>
|
||||
</data>
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part of sale_margin module for Tryton.
|
||||
The COPYRIGHT file at the top level of this repository contains the full
|
||||
copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath
|
||||
expr="/tree/field[@name="total_amount"]"
|
||||
position="after">
|
||||
<field name="margin"/>
|
||||
</xpath>
|
||||
</data>
|
Loading…
Reference in New Issue