mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[IMP] - improve sale order line view
This commit is contained in:
@@ -14,13 +14,15 @@
|
|||||||
<field name="model">sale.order</field>
|
<field name="model">sale.order</field>
|
||||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//field[@name='order_line']/form//field[@name='product_uom_qty']"
|
<xpath expr="//field[@name='order_line']/form//label[@for='name']"
|
||||||
position="after">
|
position="before">
|
||||||
|
<group col="4">
|
||||||
<field name="qty_type"
|
<field name="qty_type"
|
||||||
attrs="{'required': [('is_contract', '=', True)], 'invisible': [('is_contract', '=', False)]}"/>
|
attrs="{'required': [('is_contract', '=', True)], 'invisible': [('is_contract', '=', False)]}"/>
|
||||||
<field name="qty_formula_id"
|
<field name="qty_formula_id"
|
||||||
attrs="{'required': [('qty_type', '=', 'variable')], 'invisible': [('qty_type', '!=', 'variable')]}"
|
attrs="{'required': [('qty_type', '=', 'variable')], 'invisible': [('qty_type', '!=', 'variable')]}"
|
||||||
/>
|
/>
|
||||||
|
</group>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//field[@name='order_line']/tree//field[@name='product_uom_qty']"
|
<xpath expr="//field[@name='order_line']/tree//field[@name='product_uom_qty']"
|
||||||
position="after">
|
position="after">
|
||||||
@@ -29,9 +31,6 @@
|
|||||||
<field name="qty_formula_id"
|
<field name="qty_formula_id"
|
||||||
attrs="{'column_invisible': [('parent.is_contract', '=', False)]}"/>
|
attrs="{'column_invisible': [('parent.is_contract', '=', False)]}"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//field[@name='order_line']/form//field[@name='product_uom_qty']" position="attributes">
|
|
||||||
<attribute name="attrs">{'required': [('qty_type', '=', 'fixed')], 'invisible': [('qty_type', '!=', 'fixed')]}</attribute>
|
|
||||||
</xpath>
|
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user