mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[MIG] product_quick_bom: Migration to 12.0
This commit is contained in:
@@ -1,20 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<record id="product_template_form_view" model="ir.ui.view">
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="product.product_template_form_view"/>
|
||||
<field name="priority" eval="200"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[@name='sales']" position="after">
|
||||
<page name="bom_line" string="Bom line">
|
||||
<field name="bom_line_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="product_template_only_form_view_bomlines" model="ir.ui.view">
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="product.product_template_only_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[@name='sales']" position="after">
|
||||
<page name="bom_line" string="Bill of Materials">
|
||||
<div attrs="{'invisible': [('bom_count', '<', 2)]}"
|
||||
class="alert alert-danger text-center"
|
||||
role="alert">
|
||||
<p>The product is linked to several BoMs, modifications must be done BoM-side.</p>
|
||||
</div>
|
||||
<div attrs="{'invisible': [('bom_count', '!=', 0)]}"
|
||||
class="alert alert-danger text-center"
|
||||
role="alert">
|
||||
<p>The product doesn't have a BoM yet, you must create one before updating its components.</p>
|
||||
<button name="button_create_bom" type="object" string="Create BoM"/>
|
||||
</div>
|
||||
<field name="specific_bom_line_ids" attrs="{'invisible': [('bom_count', '!=', 1)]}">
|
||||
<tree editable="bottom">
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="attribute_value_ids" widget="many2many_tags"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user