[MIG] product_quick_bom: Migration to 13.0

This commit is contained in:
ps-tubtim
2020-09-09 10:37:19 +07:00
parent aaf95c4cb4
commit fb3e43264c
7 changed files with 57 additions and 26 deletions

View File

@@ -1,27 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<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="inherit_id" ref="product.product_template_only_form_view" />
<field name="arch" type="xml">
<xpath expr="//page[@name='sales']" position="after">
<xpath expr="//notebook" position="inside">
<page name="bom_line" string="Bill of Materials">
<div attrs="{'invisible': [('bom_count', '&lt;', 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
attrs="{'invisible': [('bom_count', '&lt;', 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
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)]}">
<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"/>
<field name="company_id" invisible="1" />
<field name="product_id" />
<field name="product_qty" />
<field
name="possible_bom_product_template_attribute_value_ids"
invisible="1"
/>
<field
name="bom_product_template_attribute_value_ids"
widget="many2many_tags"
/>
</tree>
</field>
</page>