mirror of
https://github.com/bringout/oca-ocb-mrp.git
synced 2026-04-25 15:52:08 +02:00
19.0 vanilla
This commit is contained in:
parent
accf5918df
commit
6e65e8c877
688 changed files with 225434 additions and 199401 deletions
|
|
@ -5,7 +5,7 @@
|
|||
<record id="action_report_mrp_bom" model="ir.actions.client">
|
||||
<field name="name">BoM Overview</field>
|
||||
<field name="tag">mrp_bom_report</field>
|
||||
<field name="context" eval="{'model': 'report.mrp.report_bom_structure'}" />
|
||||
<field name="context">{'model': 'report.mrp.report_bom_structure'}</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_byproduct_form_view" model="ir.ui.view">
|
||||
|
|
@ -17,11 +17,10 @@
|
|||
<field name="allowed_operation_ids" invisible="1"/>
|
||||
<field name="company_id"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_uom_category_id" invisible="1"/>
|
||||
<label for="product_qty"/>
|
||||
<div class="o_row">
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom_id" groups="uom.group_uom"/>
|
||||
<field name="product_uom_id" groups="uom.group_uom" widget="many2one_uom"/>
|
||||
</div>
|
||||
<field name="operation_id" groups="mrp.group_mrp_routings" options="{'no_quick_create':True,'no_create_edit':True}"/>
|
||||
<field name="possible_bom_product_template_attribute_value_ids" invisible="1"/>
|
||||
|
|
@ -38,137 +37,189 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="Bill of Material">
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<div class="oe_button_box" name="button_box" invisible="context.get('parent_production_id')">
|
||||
<button name="%(action_mrp_routing_time)d" type="action" class="oe_stat_button" icon="fa-clock-o" groups="mrp.group_mrp_routings">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_text">Operations<br/>Performance</span>
|
||||
</div>
|
||||
</button>
|
||||
<button name="%(action_report_mrp_bom)d" type="action"
|
||||
class="oe_stat_button" icon="fa-bars" string="Overview"/>
|
||||
class="oe_stat_button" icon="fa-bars">
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_text">BoM Overview</span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<widget name="web_ribbon" title="Archived" bg_color="text-bg-danger" invisible="active"/>
|
||||
<group>
|
||||
<group>
|
||||
<field name="active" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="product_tmpl_id" context="{'default_detailed_type': 'product'}"/>
|
||||
<field name="product_uom_category_id" invisible="1"/>
|
||||
<field name="product_tmpl_id" context="{'default_is_storable': True}"/>
|
||||
<field name="allow_operation_dependencies" invisible="1"/>
|
||||
<field name="product_id" groups="product.group_product_variant" context="{'default_detailed_type': 'product'}"/>
|
||||
<field name="product_id" groups="product.group_product_variant" context="{'default_is_storable': True}"/>
|
||||
<field name="product_id" groups="!product.group_product_variant" invisible="1"/>
|
||||
<label for="product_qty" string="Quantity"/>
|
||||
<div class="o_row">
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom_id" options="{'no_open':True,'no_create':True}" groups="uom.group_uom"/>
|
||||
<field name="product_qty" class="mw-25"/>
|
||||
<field name="product_uom_id" options="{'no_open':True, 'no_create':True, 'product_field': 'product_tmpl_id', 'quantity_field': 'product_qty'}" groups="uom.group_uom" widget="many2one_uom"/>
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
<field name="code"/>
|
||||
<field name="type" widget="radio"/>
|
||||
<p colspan="2" class="oe_grey oe_edit_only" attrs="{'invisible': [('type','!=','phantom')]}">
|
||||
<field name="type" widget="radio" invisible="context.get('parent_production_id')"/>
|
||||
<p colspan="2" class="opacity-50 oe_edit_only" invisible="type != 'phantom'">
|
||||
<ul>
|
||||
A BoM of type kit is used to split the product into its components.
|
||||
A BoM of type Kit is not produced with a manufacturing order.<br/>
|
||||
Instead, it is used to decompose a BoM into its components when:
|
||||
<li>
|
||||
At the creation of a Manufacturing Order.
|
||||
it is added as a component in a manufacturing order
|
||||
</li>
|
||||
<li>
|
||||
At the creation of a Stock Transfer.
|
||||
it is moved via a transfer, such as a receipt or a delivery order for instance.
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True, 'no_open': True}"/>
|
||||
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True, 'no_open': True}" invisible="context.get('parent_production_id')" placeholder="Visible to all"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Components" name="components">
|
||||
<field name="bom_line_ids" widget="one2many" context="{'default_parent_product_tmpl_id': product_tmpl_id, 'default_product_id': False, 'default_bom_id': id}">
|
||||
<tree string="Components" editable="bottom">
|
||||
<field name="company_id" invisible="1"/>
|
||||
<list string="Components" editable="bottom">
|
||||
<control>
|
||||
<create string="Add a line"/>
|
||||
<button name="action_add_from_catalog" string="Catalog" type="object" class="px-4 btn-link" context="{'order_id': parent.id}"/>
|
||||
</control>
|
||||
<field name="company_id" column_invisible="True"/>
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="product_id" context="{'default_detailed_type': 'product'}"/>
|
||||
<field name="product_tmpl_id" invisible="1"/>
|
||||
<button name="action_see_attachments" type="object" icon="fa-files-o" aria-label="Product Attachments" title="Product Attachments" class="float-end"/>
|
||||
<field name="attachments_count" class="text-start" string=" "/>
|
||||
<field name="product_id" context="{'default_is_storable': True}"/>
|
||||
<field name="product_tmpl_id" column_invisible="True"/>
|
||||
<button name="action_see_attachments" type="object" icon="fa-files-o" aria-label="Product Attachments" title="Product Attachments" class="float-end" column_invisible="context.get('parent_production_id')"/>
|
||||
<field name="attachments_count" class="text-start" string=" " column_invisible="context.get('parent_production_id')"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom_category_id" invisible="1"/>
|
||||
<field name="parent_product_tmpl_id" invisible="1" />
|
||||
<field name="product_uom_id" options="{'no_open':True,'no_create':True}" groups="uom.group_uom"/>
|
||||
<field name="possible_bom_product_template_attribute_value_ids" invisible="1"/>
|
||||
<field name="bom_product_template_attribute_value_ids" optional="hide" widget="many2many_tags" options="{'no_create': True}" attrs="{'column_invisible': [('parent.product_id', '!=', False)]}" groups="product.group_product_variant"/>
|
||||
<field name="allowed_operation_ids" invisible="1"/>
|
||||
<field name="operation_id" groups="mrp.group_mrp_routings" optional="hidden" attrs="{'column_invisible': [('parent.type','not in', ('normal', 'phantom'))]}" options="{'no_quick_create':True,'no_create_edit':True}"/>
|
||||
<field name="manual_consumption_readonly" invisible="1"/>
|
||||
<field name="manual_consumption" optional="hide" width="1.0" attrs="{'readonly': [('manual_consumption_readonly', '=', True)]}" force_save="1"/>
|
||||
</tree>
|
||||
<field name="parent_product_tmpl_id" column_invisible="True" />
|
||||
<field name="product_uom_id" options="{'no_open': True, 'no_create': True, 'quantity_field': 'product_qty'}" groups="uom.group_uom" widget="many2one_uom"/>
|
||||
<field name="possible_bom_product_template_attribute_value_ids" column_invisible="True"/>
|
||||
<field name="bom_product_template_attribute_value_ids" optional="hide" widget="many2many_tags" options="{'no_create': True}" column_invisible="parent.product_id" groups="product.group_product_variant"/>
|
||||
<field name="allowed_operation_ids" column_invisible="True"/>
|
||||
<field name="operation_id" groups="mrp.group_mrp_routings" optional="hidden" column_invisible="parent.type not in ('normal', 'phantom')" options="{'no_quick_create':True,'no_create_edit':True}"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Operations"
|
||||
name="operations"
|
||||
attrs="{'invisible': [('type', 'not in',('normal','phantom'))]}"
|
||||
invisible="type not in ('normal', 'phantom')"
|
||||
groups="mrp.group_mrp_routings">
|
||||
<field name="operation_ids"
|
||||
attrs="{'invisible': [('type','not in',('normal','phantom'))]}"
|
||||
groups="mrp.group_mrp_routings"
|
||||
context="{'bom_id_invisible': True, 'default_bom_id': id, 'tree_view_ref': 'mrp.mrp_routing_workcenter_bom_tree_view'}"/>
|
||||
<field name="operation_ids" invisible="operation_ids.length == 0"
|
||||
context="{'bom_id_invisible': True, 'default_bom_id': id, 'list_view_ref': 'mrp.mrp_routing_workcenter_bom_tree_view', 'target': 'new'}"/>
|
||||
<div invisible="operation_ids.length != 0">
|
||||
<div class="o_mrp_routing_image bill_of_material position-relative">
|
||||
<img class="position-absolute" src="/mrp/static/img/routing_shopfloor.png" alt="Shop Floor"/>
|
||||
<div class="separator position-relative"/>
|
||||
<span class="o_annotation o_annotation_1 o_annotation_end position-absolute">Time Clock</span>
|
||||
<span class="o_annotation o_annotation_2 o_annotation_end position-absolute">Quality Control</span>
|
||||
<span class="o_annotation o_annotation_3 o_annotation_start position-absolute">Feedback Loop</span>
|
||||
<span class="o_annotation o_annotation_4 o_annotation_start position-absolute">Register Materials</span>
|
||||
<span class="o_annotation o_annotation_5 o_annotation_start position-absolute">Select Operator</span>
|
||||
<div class="o_text position-absolute">
|
||||
<p>
|
||||
No Operations Yet !
|
||||
</p>
|
||||
<p>
|
||||
Run your Shop Floor with work orders for each operation defined on your bill of material.
|
||||
</p>
|
||||
<p>
|
||||
Each operation can have multiple steps (scan products, view instructions) or even quality checks.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-center gap-1" invisible="operation_ids.length != 0">
|
||||
<button name="action_open_operation_form" type="object" class="btn btn-primary">
|
||||
<span class="o_stat_text">Add Operation</span>
|
||||
</button>
|
||||
<button name="action_copy_existing_operations" type="object" invisible="not show_copy_operations_button">
|
||||
<span class="o_stat_text">Copy Existing Operations</span>
|
||||
</button>
|
||||
</div>
|
||||
</page>
|
||||
<page string="By-products"
|
||||
name="by_products"
|
||||
attrs="{'invisible': [('type','!=','normal')]}"
|
||||
invisible="type != 'normal'"
|
||||
groups="mrp.group_mrp_byproducts">
|
||||
<field name="byproduct_ids" context="{'form_view_ref' : 'mrp.mrp_bom_byproduct_form_view', 'default_bom_id': id}">
|
||||
<tree string="By-products" editable="top">
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="product_uom_category_id" invisible="1"/>
|
||||
<field name="byproduct_ids" context="{'form_view_ref' : 'mrp.mrp_bom_byproduct_form_view', 'default_bom_id': id}">
|
||||
<list string="By-products" editable="bottom">
|
||||
<control>
|
||||
<create string="Add a line"/>
|
||||
<button name="action_add_from_catalog" string="Catalog" type="object" class="px-4 btn-link" context="{'order_id': parent.id}"/>
|
||||
</control>
|
||||
<field name="company_id" column_invisible="True"/>
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="product_id" context="{'default_detailed_type': 'product'}"/>
|
||||
<field name="product_id" context="{'default_is_storable': True}"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom_id" groups="uom.group_uom"/>
|
||||
<field name="product_uom_id" groups="uom.group_uom" options="{'quantity_field': 'product_qty'}" widget="many2one_uom"/>
|
||||
<field name="cost_share" optional="hide"/>
|
||||
<field name="allowed_operation_ids" invisible="1"/>
|
||||
<field name="allowed_operation_ids" column_invisible="True"/>
|
||||
<field name="operation_id" groups="mrp.group_mrp_routings" options="{'no_quick_create':True,'no_create_edit':True}"/>
|
||||
<field name="possible_bom_product_template_attribute_value_ids" invisible="1"/>
|
||||
<field name="bom_product_template_attribute_value_ids" optional="hide" widget="many2many_tags" options="{'no_create': True}" attrs="{'column_invisible': [('parent.product_id', '!=', False)]}" groups="product.group_product_variant"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="possible_bom_product_template_attribute_value_ids" column_invisible="True"/>
|
||||
<field name="bom_product_template_attribute_value_ids" optional="hide" widget="many2many_tags" options="{'no_create': True}" column_invisible="parent.product_id" groups="product.group_product_variant"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Miscellaneous" name="miscellaneous">
|
||||
<group>
|
||||
<group>
|
||||
<field name="ready_to_produce" attrs="{'invisible': [('type','=','phantom')]}" string="Manufacturing Readiness" widget="radio" groups="mrp.group_mrp_routings"/>
|
||||
<field name="consumption" attrs="{'invisible': [('type','=','phantom')]}" widget="radio"/>
|
||||
<field name="ready_to_produce" invisible="type == 'phantom'" string="Manufacturing Readiness" widget="radio" groups="mrp.group_mrp_routings"/>
|
||||
<field name="consumption" invisible="type == 'phantom'" widget="radio"/>
|
||||
<field name="allow_operation_dependencies" groups="mrp.group_mrp_workorder_dependencies"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="picking_type_id" attrs="{'invisible': [('type','=','phantom')]}" string="Operation" groups="stock.group_adv_location"/>
|
||||
<field name="picking_type_id" invisible="type == 'phantom'" groups="stock.group_adv_location"/>
|
||||
<label for="produce_delay" string="Manuf. Lead Time"/>
|
||||
<div>
|
||||
<field name="produce_delay" class="oe_inline"/> days
|
||||
</div>
|
||||
<label for="days_to_prepare_mo"/>
|
||||
<div>
|
||||
<field name="days_to_prepare_mo" class="oe_inline"/> days
|
||||
<button name="action_compute_bom_days" string="Compute" type="object"
|
||||
help="Compute the days required to resupply all components from BoM, by either buying or manufacturing the components and/or subassemblies."
|
||||
class="oe_link pt-0"/>
|
||||
</div>
|
||||
<label for="batch_size" invisible="type != 'normal'"/>
|
||||
<div class="o_row" invisible="type != 'normal'">
|
||||
<field name="enable_batch_size"/>
|
||||
<field name="batch_size" class="w-50" invisible="not enable_batch_size" decoration-danger="batch_size <= 0.0"/>
|
||||
<field name="product_uom_id" groups="uom.group_uom" readonly="1" invisible="not enable_batch_size"/>
|
||||
</div>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids"/>
|
||||
<field name="message_ids" colspan="4" nolabel="1"/>
|
||||
</div>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_tree_view" model="ir.ui.view">
|
||||
<field name="name">mrp.bom.tree</field>
|
||||
<field name="name">mrp.bom.list</field>
|
||||
<field name="model">mrp.bom</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Bill of Materials" sample="1" default_order="sequence, id">
|
||||
<field name="active" invisible="1"/>
|
||||
<list string="Bill of Materials" sample="1" multi_edit="1">
|
||||
<field name="active" column_invisible="True"/>
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="company_id" column_invisible="True"/>
|
||||
<field name="product_tmpl_id"/>
|
||||
<field name="code" optional="show"/>
|
||||
<field name="type"/>
|
||||
<field name="product_id" groups="product.group_product_variant" optional="hide"/>
|
||||
<field name="product_id" groups="!product.group_product_variant" column_invisible="1"/>
|
||||
<field name="company_id" groups="base.group_multi_company" optional="show"/>
|
||||
<field name="product_qty" optional="hide"/>
|
||||
<field name="product_uom_id" groups="uom.group_uom" optional="hide" string="Unit of Measure"/>
|
||||
</tree>
|
||||
<field name="product_uom_id" groups="uom.group_uom" optional="hide" widget="many2one_uom"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
@ -177,19 +228,15 @@
|
|||
<field name="model">mrp.bom</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban class="o_kanban_mobile" sample="1">
|
||||
<field name="product_tmpl_id"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom_id"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div t-attf-class="oe_kanban_global_click">
|
||||
<div class="o_kanban_record_top">
|
||||
<div class="o_kanban_record_headings mt4">
|
||||
<strong class="o_kanban_record_title"><span class="mt4"><field name="product_tmpl_id"/></span></strong>
|
||||
</div>
|
||||
<span class="float-end badge rounded-pill"><t t-esc="record.product_qty.value"/> <small><t t-esc="record.product_uom_id.value"/></small></span>
|
||||
</div>
|
||||
<t t-name="card">
|
||||
<div>
|
||||
<field name="product_tmpl_id" class="fw-medium fs-5"/>
|
||||
<span class="float-end badge rounded-pill"><field name="product_qty"/> <field name="product_uom_id" class="small" groups="uom.group_uom"/></span>
|
||||
</div>
|
||||
<footer class="pt-1">
|
||||
<field name="code"/>
|
||||
</footer>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
|
|
@ -208,10 +255,10 @@
|
|||
<filter string="Kit" name="phantom" domain="[('type', '=', 'phantom')]"/>
|
||||
<separator/>
|
||||
<filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<group>
|
||||
<filter string="Product" name="product" domain="[]" context="{'group_by': 'product_tmpl_id'}"/>
|
||||
<filter string='BoM Type' name="group_by_type" domain="[]" context="{'group_by' : 'type'}"/>
|
||||
<filter string='Unit of Measure' name="default_unit_of_measure" domain="[]" context="{'group_by' : 'product_uom_id'}"/>
|
||||
<filter string='Unit' name="default_unit_of_measure" domain="[]" context="{'group_by' : 'product_uom_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
|
@ -219,10 +266,10 @@
|
|||
|
||||
<record id="mrp_bom_form_action" model="ir.actions.act_window">
|
||||
<field name="name">Bills of Materials</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.bom</field>
|
||||
<field name="path">boms</field>
|
||||
<field name="domain">[]</field> <!-- force empty -->
|
||||
<field name="view_mode">tree,kanban,form</field>
|
||||
<field name="view_mode">list,kanban,form</field>
|
||||
<field name="search_view_id" ref="view_mrp_bom_filter"/>
|
||||
<field name="context">{'default_company_id': allowed_company_ids[0]}</field>
|
||||
<field name="help" type="html">
|
||||
|
|
@ -255,8 +302,7 @@
|
|||
<label for="product_qty" string="Quantity"/>
|
||||
<div class="o_row">
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom_category_id" invisible="1"/>
|
||||
<field name="product_uom_id" options="{'no_open':True,'no_create':True}" groups="uom.group_uom"/>
|
||||
<field name="product_uom_id" options="{'no_open':True,'no_create':True, 'quantity_field': 'product_qty'}" groups="uom.group_uom" widget="many2one_uom"/>
|
||||
</div>
|
||||
<field name="possible_bom_product_template_attribute_value_ids" invisible="1"/>
|
||||
<field name="bom_product_template_attribute_value_ids" widget="many2many_tags" options="{'no_create': True}" groups="product.group_product_variant"/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue