[IMP] - improve sale order line view

This commit is contained in:
sbejaoui
2019-01-24 12:08:00 +01:00
parent 22b9d1cc00
commit e755f2fee0

View File

@@ -14,13 +14,15 @@
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='order_line']/form//field[@name='product_uom_qty']"
position="after">
<xpath expr="//field[@name='order_line']/form//label[@for='name']"
position="before">
<group col="4">
<field name="qty_type"
attrs="{'required': [('is_contract', '=', True)], 'invisible': [('is_contract', '=', False)]}"/>
<field name="qty_formula_id"
attrs="{'required': [('qty_type', '=', 'variable')], 'invisible': [('qty_type', '!=', 'variable')]}"
/>
</group>
</xpath>
<xpath expr="//field[@name='order_line']/tree//field[@name='product_uom_qty']"
position="after">
@@ -29,9 +31,6 @@
<field name="qty_formula_id"
attrs="{'column_invisible': [('parent.is_contract', '=', False)]}"/>
</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>
</record>