[IMP] mrp_usability: improve smart button from products to BoMs
This commit is contained in:
25
mrp_usability/views/product_views.xml
Normal file
25
mrp_usability/views/product_views.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
<record id="product_template_form_view_bom_button" model="ir.ui.view">
|
||||
<field name="name">product.template.procurement</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="mrp.product_template_form_view_bom_button" />
|
||||
<field name="arch" type="xml">
|
||||
|
||||
<xpath expr="//field[@name='bom_count']/.." position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='bom_count']/.." position="after">
|
||||
<button class="oe_stat_button" name="action_view_bom" type="object"
|
||||
attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}"
|
||||
icon="fa-flask">
|
||||
<field string="Bill of Materials" name="bom_count"
|
||||
widget="statinfo" />
|
||||
</button>
|
||||
</xpath>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user