mirror of
https://github.com/bringout/oca-ocb-mrp.git
synced 2026-04-26 04:52:04 +02:00
19.0 vanilla
This commit is contained in:
parent
accf5918df
commit
6e65e8c877
688 changed files with 225434 additions and 199401 deletions
|
|
@ -7,22 +7,6 @@
|
|||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="stock.view_template_property_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//label[@for='sale_delay']" position="before">
|
||||
<field name="bom_count" string="Bill of Materials" invisible="1" groups="mrp.group_mrp_user"/>
|
||||
<label for="produce_delay" string="Manuf. Lead Time" attrs="{'invisible':[('type','=','service')]}"/>
|
||||
<div attrs="{'invisible':[('type','=','service')]}">
|
||||
<field name="produce_delay" class="oe_inline"/> days
|
||||
</div>
|
||||
<label for="days_to_prepare_mo" attrs="{'invisible':[('type','=','service')]}"/>
|
||||
<div attrs="{'invisible':[('type','=','service')]}">
|
||||
<field name="days_to_prepare_mo" class="oe_inline"/> days
|
||||
<button name="action_compute_bom_days" string="Compute from BoM" type="object" attrs="{'invisible':['|', ('type', '=', 'service'), ('bom_count', '=', 0)]}"
|
||||
groups="mrp.group_mrp_user"
|
||||
help="Compute the days required to resupply all components from BoM, by either buying or manufacturing the components and/or subassemblies.
|
||||
Also note that purchase security lead times will be added when appropriate."
|
||||
class="oe_link pt-0"/>
|
||||
</div>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='product_variant_count']" position="after">
|
||||
<field name="is_kits" invisible="1"/>
|
||||
</xpath>
|
||||
|
|
@ -35,11 +19,11 @@
|
|||
<field name="mode">primary</field>
|
||||
<field name="inherit_id" ref="product.product_template_search_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//filter[@name='consumable']" position="after">
|
||||
<filter name="combo" position="after">
|
||||
<separator/>
|
||||
<filter string="Manufactured Products" name="manufactured_products" domain="[('bom_ids', '!=', False)]"/>
|
||||
<filter string="BoM Components" name="components" domain="[('bom_line_ids', '!=', False)]"/>
|
||||
</xpath>
|
||||
</filter>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
@ -49,20 +33,21 @@
|
|||
<field name="mode">primary</field>
|
||||
<field name="inherit_id" ref="product.product_search_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//filter[@name='consumable']" position="after">
|
||||
<filter name="combo" position="after">
|
||||
<separator/>
|
||||
<filter string="Manufactured Products" name="manufactured_products" domain="[('bom_ids', '!=', False)]"/>
|
||||
<filter string="BoM Components" name="components" domain="[('bom_line_ids', '!=', False)]"/>
|
||||
</xpath>
|
||||
</filter>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_template_action" model="ir.actions.act_window">
|
||||
<field name="name">Products</field>
|
||||
<field name="res_model">product.template</field>
|
||||
<field name="path">manufacturing-products</field>
|
||||
<field name="search_view_id" ref="mrp_product_template_search_view"/>
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
<field name="context">{"search_default_consumable": 1, 'default_detailed_type': 'product'}</field>
|
||||
<field name="view_mode">kanban,list,form</field>
|
||||
<field name="context">{"search_default_goods": 1, 'default_is_storable': True}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
No product found. Let's create one!
|
||||
|
|
@ -73,6 +58,28 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_view_search_catalog" model="ir.ui.view">
|
||||
<field name="name">product.view.search.catalog.inherit.mrp</field>
|
||||
<field name="inherit_id" ref="product.product_view_search_catalog"/>
|
||||
<field name="model">product.product</field>
|
||||
<field name="arch" type="xml">
|
||||
<filter name="goods" position="after">
|
||||
<filter string="In the BoM"
|
||||
invisible="context.get('active_model') != 'mrp.bom.line'"
|
||||
name="products_in_bom"
|
||||
domain="[('product_catalog_product_is_in_bom', '=', True)]"/>
|
||||
<filter string="In the MO"
|
||||
invisible="context.get('active_model') != 'stock.move' or
|
||||
context.get('product_catalog_order_model') != 'mrp.production'"
|
||||
name="products_in_mo"
|
||||
domain="[('product_catalog_product_is_in_mo', '=', True)]"/>
|
||||
</filter>
|
||||
<filter name="services" position="attributes">
|
||||
<attribute name="invisible">context.get('product_catalog_order_model') == 'mrp.production'</attribute>
|
||||
</filter>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_mrp_product_form"
|
||||
name="Products"
|
||||
action="product_template_action"
|
||||
|
|
@ -82,7 +89,7 @@
|
|||
<field name="name">Product Variants</field>
|
||||
<field name="res_model">product.product</field>
|
||||
<field name="search_view_id" ref="mrp_product_product_search_view"/>
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
<field name="view_mode">kanban,list,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="product_variant_mrp" name="Product Variants"
|
||||
|
|
@ -95,29 +102,31 @@
|
|||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="stock.product_template_form_view_procurement_button"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@name='action_open_product_lot']" position="after">
|
||||
<button name="action_open_documents" position="before">
|
||||
<button class="oe_stat_button" name="%(template_open_bom)d" type="action"
|
||||
groups="mrp.group_mrp_user"
|
||||
attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}" icon="fa-flask">
|
||||
invisible="type != 'consu'" icon="fa-flask">
|
||||
<field string="Bill of Materials" name="bom_count" widget="statinfo" />
|
||||
</button>
|
||||
</button>
|
||||
<button name="action_open_documents" position="after">
|
||||
<button class="oe_stat_button" name="action_used_in_bom" type="object"
|
||||
groups="mrp.group_mrp_user"
|
||||
attrs="{'invisible':['|',('type', 'not in', ['product', 'consu']), ('used_in_bom_count', '=', 0)]}" icon="fa-level-up">
|
||||
invisible="type != 'consu' or used_in_bom_count == 0" icon="fa-level-up">
|
||||
<field string="Used In" name="used_in_bom_count" widget="statinfo" />
|
||||
</button>
|
||||
<button class="oe_stat_button" name="action_view_mos" type="object"
|
||||
groups="mrp.group_mrp_user"
|
||||
attrs="{'invisible': ['|', '|', ('type', 'not in', ['product', 'consu']), ('bom_count', '=', 0), ('mrp_product_qty', '=', 0)]}" icon="fa-list-alt" help="Manufactured in the last 365 days">
|
||||
invisible="type != 'consu' or bom_count == 0 or mrp_product_qty == 0" icon="fa-list-alt" help="Manufactured in the last 365 days">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
<span class="o_stat_value d-flex gap-1">
|
||||
<field name="mrp_product_qty" widget="statinfo" nolabel="1" class="mr4"/>
|
||||
<field name="uom_name"/>
|
||||
<field name="uom_name" groups="uom.group_uom"/>
|
||||
</span>
|
||||
<span class="o_stat_text">Manufactured</span>
|
||||
</div>
|
||||
</button>
|
||||
</xpath>
|
||||
</button>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
@ -129,21 +138,21 @@
|
|||
<xpath expr="//button[@name='action_open_product_lot']" position="after">
|
||||
<button class="oe_stat_button" name="action_view_bom" type="object"
|
||||
groups="mrp.group_mrp_user"
|
||||
attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}" icon="fa-flask">
|
||||
invisible="type != 'consu'" icon="fa-flask">
|
||||
<field string="Bill of Materials" name="bom_count" widget="statinfo" />
|
||||
</button>
|
||||
<button class="oe_stat_button" name="action_used_in_bom" type="object"
|
||||
groups="mrp.group_mrp_user"
|
||||
attrs="{'invisible':['|',('type', 'not in', ['product', 'consu']), ('used_in_bom_count', '=', 0)]}" icon="fa-level-up">
|
||||
invisible="type != 'consu' or used_in_bom_count == 0" icon="fa-level-up">
|
||||
<field string="Used In" name="used_in_bom_count" widget="statinfo" />
|
||||
</button>
|
||||
<button class="oe_stat_button" name="action_view_mos" type="object"
|
||||
groups="mrp.group_mrp_user"
|
||||
attrs="{'invisible': ['|', '|', ('type', 'not in', ['product', 'consu']), ('bom_count', '=', 0), ('mrp_product_qty', '=', 0)]}" icon="fa-list-alt" help="Manufactured in the last 365 days">
|
||||
invisible="type != 'consu' or bom_count == 0 or mrp_product_qty == 0" icon="fa-list-alt" help="Manufactured in the last 365 days">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
<span class="o_stat_value d-flex gap-1">
|
||||
<field name="mrp_product_qty" widget="statinfo" nolabel="1" class="mr4"/>
|
||||
<field name="uom_name"/>
|
||||
<field name="uom_name" groups="uom.group_uom"/>
|
||||
</span>
|
||||
<span class="o_stat_text">Manufactured</span>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue