You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

35 lines
1.7 KiB

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Inherit product template form view to add catch weight fields-->
<record id="product_template_form_view" model="ir.ui.view">
<field name="name">product.template.view.form.inherit.cw.stock</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="arch" type="xml">
<xpath expr="//div[@name='options']" position="inside">
<span class="d-inline-block">
<field name="catch_weight_ok"
style="padding-right:50px;"/>
<label class="o_form_label" for="catch_weight_ok">
Is Catch Weight
<sup class="btn-link p-1">?</sup>
</label>
</span>
</xpath>
<xpath expr="//field[@name='uom_id']" position="after">
<field name="category_id" invisible="1"/>
<field name="cw_uom_id"
attrs="{'invisible': [('catch_weight_ok', '=', False)],
'required':[('catch_weight_ok', '=', True)]}"/>
<label for="average_cw_qty"
attrs="{'invisible': [('catch_weight_ok', '=', False)],
'required':[('catch_weight_ok', '=', True)]}"/>
<div name="average_cw_qty" class="o_row"
attrs="{'invisible': [('catch_weight_ok', '=', False)],
'required':[('catch_weight_ok', '=', True)]}">
<field name="average_cw_qty" class="oe_inline"/>
</div>
</xpath>
</field>
</record>
</odoo>