mirror of
https://github.com/bringout/oca-ocb-mrp.git
synced 2026-04-25 20:52:02 +02:00
19.0 vanilla
This commit is contained in:
parent
accf5918df
commit
6e65e8c877
688 changed files with 225434 additions and 199401 deletions
|
|
@ -1,95 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<!-- Files -->
|
||||
<record model="ir.ui.view" id="view_document_file_kanban_mrp">
|
||||
<field name="name">mrp.document kanban.mrp</field>
|
||||
<field name="model">mrp.document</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban js_class="mrp_documents_kanban" class="o_mrp_documents_kanban_view" create="false">
|
||||
<field name="ir_attachment_id"/>
|
||||
<field name="mimetype"/>
|
||||
<field name="type"/>
|
||||
<field name="name"/>
|
||||
<field name="priority"/>
|
||||
<field name="create_uid"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div class="oe_kanban_global_area o_kanban_attachment oe_kanban_global_click">
|
||||
<div class="o_kanban_image">
|
||||
<t t-set="binaryPreviewable"
|
||||
t-value="new RegExp('(image|video|application/pdf|text)').test(record.mimetype.value) && record.type.raw_value === 'binary'"/>
|
||||
<div t-attf-class="o_kanban_image_wrapper #{(webimage or binaryPreviewable) ? 'o_kanban_previewer' : ''}">
|
||||
<t t-set="webimage" t-value="new RegExp('image.*(gif|jpeg|jpg|png)').test(record.mimetype.value)"/>
|
||||
<div t-if="record.type.raw_value == 'url'" class="o_url_image fa fa-link fa-3x text-muted" aria-label="Image is a link"/>
|
||||
<img t-elif="webimage" t-attf-src="/web/image/#{record.ir_attachment_id.raw_value}" width="100" height="100" alt="Document" class="o_attachment_image"/>
|
||||
<div t-else="" class="o_image o_image_thumbnail" t-att-data-mimetype="record.mimetype.value"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="o_kanban_details">
|
||||
<div class="o_kanban_details_wrapper">
|
||||
<div class="o_kanban_record_title">
|
||||
<field name="name" class="o_text_overflow"/>
|
||||
</div>
|
||||
<div class="o_kanban_record_body">
|
||||
<field name="url" widget="url" attrs="{'invisible':[('type','=','binary')]}"/>
|
||||
</div>
|
||||
<div class="o_kanban_record_bottom">
|
||||
<span class="oe_kanban_bottom_left">
|
||||
<field name="priority" widget="priority"/>
|
||||
</span>
|
||||
<div class="oe_kanban_bottom_right">
|
||||
<field name="create_uid" widget="many2one_avatar_user"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="o_dropdown_kanban dropdown" tabindex="-1">
|
||||
<a class="dropdown-toggle o-no-caret btn" data-bs-toggle="dropdown" href="#" role="button" aria-label="Dropdown menu" title="Dropdown menu">
|
||||
<span class="fa fa-ellipsis-v"/>
|
||||
</a>
|
||||
<div class="dropdown-menu" role="menu" aria-labelledby="dLabel">
|
||||
<a t-if="widget.editable" type="edit" class="dropdown-item">Edit</a>
|
||||
<a t-if="widget.deletable" type="delete" class="dropdown-item">Delete</a>
|
||||
<a class="dropdown-item o_mrp_download">Download</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_mrp_document_form" model="ir.ui.view">
|
||||
<field name="name">mrp.document.form</field>
|
||||
<field name="model">mrp.document</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Attachments">
|
||||
<sheet>
|
||||
<label for="name"/>
|
||||
<h1>
|
||||
<field name="name"/>
|
||||
</h1>
|
||||
<group>
|
||||
<group>
|
||||
<field name="type"/>
|
||||
<field name="datas" filename="name" attrs="{'invisible':[('type','=','url')]}"/>
|
||||
<field name="url" widget="url" attrs="{'invisible':[('type','=','binary')]}"/>
|
||||
</group>
|
||||
<group string="Attached To" groups="base.group_no_one">
|
||||
<field name="res_name"/>
|
||||
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
||||
</group>
|
||||
<group string="History" groups="base.group_no_one" attrs="{'invisible':[('create_date','=',False)]}">
|
||||
<label for="create_uid" string="Creation"/>
|
||||
<div name="creation_div">
|
||||
<field name="create_uid" readonly="1" class="oe_inline"/> on
|
||||
<field name="create_date" readonly="1" class="oe_inline"/>
|
||||
</div>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -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"/>
|
||||
|
|
|
|||
|
|
@ -1,42 +1,79 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<!-- Manufacturing Order -->
|
||||
<record id="mrp_production_tree_view" model="ir.ui.view">
|
||||
<field name="name">mrp.production.tree</field>
|
||||
<record id="action_report_mo_overview" model="ir.actions.client">
|
||||
<field name="name">MO Overview</field>
|
||||
<field name="tag">mrp_mo_overview</field>
|
||||
<field name="context">{'model': 'report.mrp.report_mo_overview'}</field>
|
||||
</record>
|
||||
|
||||
<record id="action_mrp_display" model="ir.actions.client">
|
||||
<field name="name">Mrp Display</field>
|
||||
<field name="tag">mrp_display</field>
|
||||
<field name="res_model">mrp.production</field>
|
||||
</record>
|
||||
|
||||
<record id="action_mrp_display_fullscreen" model="ir.actions.client">
|
||||
<field name="name">Manufacturing</field>
|
||||
<field name="tag">mrp_display</field>
|
||||
<field name="target">fullscreen</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_production_view_activity" model="ir.ui.view">
|
||||
<field name="name">mrp.production.view.activity</field>
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Manufacturing Orders" multi_edit="1" sample="1" decoration-info="state == 'draft'">
|
||||
<activity string="Manufacturing Orders">
|
||||
<templates>
|
||||
<div t-name="activity-box" class="d-flex w-100">
|
||||
<field name="user_id" widget="many2one_avatar_user"/>
|
||||
<div class="flex-grow-1">
|
||||
<field name="name" class="o_text_block"/>
|
||||
<field name="date_start" class="d-block"/>
|
||||
</div>
|
||||
</div>
|
||||
</templates>
|
||||
</activity>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_production_tree_view" model="ir.ui.view">
|
||||
<field name="name">mrp.production.list</field>
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Manufacturing Orders" multi_edit="1" sample="1" decoration-info="state == 'draft'">
|
||||
<header>
|
||||
<button name="button_plan" type="object" string="Plan"/>
|
||||
<button name="do_unreserve" type="object" string="Unreserve"/>
|
||||
<button name="action_cancel" type="object" string="Cancel"/>
|
||||
<button name="action_assign" type="object" string="Check availability"/>
|
||||
<button name="action_cancel" type="object" string="Cancel" confirm="Are you sure you want to cancel these manufacturing orders?"/>
|
||||
</header>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="product_uom_category_id" invisible="1"/>
|
||||
<field name="company_id" column_invisible="True"/>
|
||||
<field name="priority" optional="show" widget="priority" nolabel="1"/>
|
||||
<field name="message_needaction" invisible="1"/>
|
||||
<field name="message_needaction" column_invisible="True"/>
|
||||
<field name="name" decoration-bf="1"/>
|
||||
<field name="date_planned_start" optional="show" widget="remaining_days"/>
|
||||
<field name="date_deadline" widget="remaining_days" attrs="{'invisible': [('state', 'in', ['done', 'cancel'])]}" optional="hide"/>
|
||||
<field name="date_start" optional="show" widget="remaining_days"/>
|
||||
<field name="date_finished" optional="hide" widget="remaining_days"/>
|
||||
<field name="date_deadline" widget="mrp_remaining_days_unformatted" invisible="state in ['done', 'cancel']" optional="hide"
|
||||
decoration-danger="is_delayed"
|
||||
decoration-bf="is_delayed"/>
|
||||
<field name="product_id" readonly="1" optional="show"/>
|
||||
<field name="lot_producing_id" optional="hide"/>
|
||||
<field name="lot_producing_ids" optional="hide" widget="many2many_tags"/>
|
||||
<field name="bom_id" readonly="1" optional="hide"/>
|
||||
<field name="activity_ids" string="Next Activity" widget="list_activity" optional="show"/>
|
||||
<field name="origin" optional="show"/>
|
||||
<field name="user_id" optional="hide" widget="many2one_avatar_user"/>
|
||||
<field name="components_availability_state" invisible="1" options='{"lazy": true}'/>
|
||||
<field name="origin" optional="show" readonly="state in ['cancel', 'done']"/>
|
||||
<field name="user_id" optional="hide" widget="many2one_avatar_user" readonly="state in ['cancel', 'done']"/>
|
||||
<field name="components_availability_state" column_invisible="True" options='{"lazy": true}'/>
|
||||
<field name="components_availability" options='{"lazy": true}'
|
||||
attrs="{'invisible': [('state', 'not in', ['confirmed', 'progress'])]}"
|
||||
invisible="state not in ['confirmed', 'progress']"
|
||||
optional="show"
|
||||
decoration-success="reservation_state == 'assigned' or components_availability_state == 'available'"
|
||||
decoration-warning="reservation_state != 'assigned' and components_availability_state in ('expected', 'available')"
|
||||
decoration-danger="reservation_state != 'assigned' and components_availability_state == 'late'"/>
|
||||
decoration-danger="reservation_state != 'assigned' and components_availability_state in ('late', 'unavailable')"/>
|
||||
<field name="reservation_state" optional="hide" decoration-danger="reservation_state == 'confirmed'" decoration-success="reservation_state == 'assigned'"/>
|
||||
<field name="product_qty" sum="Total Qty" string="Quantity" readonly="1" optional="show"/>
|
||||
<field name="product_uom_id" string="UoM" readonly="1" options="{'no_open':True,'no_create':True}" groups="uom.group_uom" optional="show"/>
|
||||
<field name="production_duration_expected" attrs="{'invisible': [('production_duration_expected', '=', 0)]}" groups="mrp.group_mrp_routings" widget="float_time" sum="Total expected duration" optional="show"/>
|
||||
<field name="production_real_duration" attrs="{'invisible': [('production_real_duration', '=', 0)]}" groups="mrp.group_mrp_routings" widget="float_time" sum="Total real duration" optional="show"/>
|
||||
<field name="product_uom_id" readonly="1" options="{'no_open':True,'no_create':True}" groups="uom.group_uom" widget="many2one_uom" optional="show"/>
|
||||
<field name="duration_expected" invisible="duration_expected == 0" groups="mrp.group_mrp_routings" widget="float_time" sum="Total expected duration" optional="hide"/>
|
||||
<field name="duration" invisible="duration == 0" groups="mrp.group_mrp_routings" widget="float_time" sum="Total real duration" optional="hide"/>
|
||||
<field name="company_id" readonly="1" groups="base.group_multi_company" optional="show"/>
|
||||
<field name="state"
|
||||
decoration-success="state in ('done', 'to_close')"
|
||||
|
|
@ -46,9 +83,10 @@
|
|||
decoration-muted="state == 'draft'"
|
||||
optional="show" widget="badge" class="text-dark"/>
|
||||
<field name="activity_exception_decoration" widget="activity_exception"/>
|
||||
<field name="delay_alert_date" invisible="1"/>
|
||||
<field nolabel="1" name="json_popover" widget="stock_rescheduling_popover" attrs="{'invisible': [('json_popover', '=', False)]}"/>
|
||||
</tree>
|
||||
<field name="delay_alert_date" column_invisible="True"/>
|
||||
<field name="is_delayed" column_invisible="True"/>
|
||||
<field nolabel="1" name="json_popover" widget="stock_rescheduling_popover" invisible="not json_popover"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
@ -56,16 +94,71 @@
|
|||
<field name="name">Split</field>
|
||||
<field name="model_id" ref="mrp.model_mrp_production"/>
|
||||
<field name="binding_model_id" ref="mrp.model_mrp_production"/>
|
||||
<field name="binding_view_types">list,form</field>
|
||||
<field name="binding_view_types">list,kanban,form</field>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = records.action_split()</field>
|
||||
</record>
|
||||
|
||||
<record id="action_print_labels" model="ir.actions.server">
|
||||
<field name="name">Labels</field>
|
||||
<field name="model_id" ref="mrp.model_mrp_production"/>
|
||||
<field name="binding_model_id" ref="mrp.model_mrp_production"/>
|
||||
<field name="binding_view_types">list,kanban,form</field>
|
||||
<field name="binding_type">report</field>
|
||||
<field name="state">code</field>
|
||||
<field name="code">
|
||||
if records:
|
||||
action = records.action_open_label_type()
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_production_order_lock_unlock" model="ir.actions.server">
|
||||
<field name="name">Lock/Unlock</field>
|
||||
<field name="model_id" ref="mrp.model_mrp_production"/>
|
||||
<field name="binding_model_id" ref="mrp.model_mrp_production"/>
|
||||
<field name="binding_view_types">form</field>
|
||||
<field name="state">code</field>
|
||||
<field name="code">
|
||||
if records:
|
||||
records.action_toggle_is_locked()</field>
|
||||
</record>
|
||||
|
||||
<record id="action_production_order_scrap" model="ir.actions.server">
|
||||
<field name="name">Scrap</field>
|
||||
<field name="model_id" ref="mrp.model_mrp_production"/>
|
||||
<field name="binding_model_id" ref="mrp.model_mrp_production"/>
|
||||
<field name="binding_view_types">form</field>
|
||||
<field name="state">code</field>
|
||||
<field name="code">
|
||||
if records:
|
||||
action = records.button_scrap()</field>
|
||||
</record>
|
||||
|
||||
<record id="action_print_labels" model="ir.actions.server">
|
||||
<field name="name">Print Labels</field>
|
||||
<field name="model_id" ref="mrp.model_mrp_production"/>
|
||||
<field name="binding_model_id" ref="mrp.model_mrp_production"/>
|
||||
<field name="binding_view_types">form</field>
|
||||
<field name="state">code</field>
|
||||
<field name="code">
|
||||
if records:
|
||||
action = records.action_open_label_type()</field>
|
||||
</record>
|
||||
|
||||
<record id="action_plan_with_components_availability" model="ir.actions.server">
|
||||
<field name="name">Plan based on Components Availability</field>
|
||||
<field name="model_id" ref="mrp.model_mrp_production"/>
|
||||
<field name="binding_model_id" ref="mrp.model_mrp_production"/>
|
||||
<field name="binding_view_types">list,kanban,form</field>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = records.action_plan_with_components_availability()</field>
|
||||
</record>
|
||||
|
||||
<record id="action_production_order_merge" model="ir.actions.server">
|
||||
<field name="name">Merge</field>
|
||||
<field name="model_id" ref="mrp.model_mrp_production"/>
|
||||
<field name="binding_model_id" ref="mrp.model_mrp_production"/>
|
||||
<field name="binding_view_types">list</field>
|
||||
<field name="binding_view_types">list,kanban</field>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = records.action_merge()</field>
|
||||
</record>
|
||||
|
|
@ -74,7 +167,7 @@
|
|||
<field name="name">Mark as Done</field>
|
||||
<field name="model_id" ref="mrp.model_mrp_production"/>
|
||||
<field name="binding_model_id" ref="mrp.model_mrp_production"/>
|
||||
<field name="binding_view_types">list</field>
|
||||
<field name="binding_view_types">list,kanban</field>
|
||||
<field name="state">code</field>
|
||||
<field name="code">
|
||||
if records:
|
||||
|
|
@ -90,49 +183,32 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="Manufacturing Orders">
|
||||
<header>
|
||||
<field name="confirm_cancel" invisible="1"/>
|
||||
<field name="show_lock" invisible="1"/>
|
||||
<button name="button_mark_done" attrs="{'invisible': ['|', '|', ('state', 'in', ('draft', 'cancel', 'done', 'to_close')), ('qty_producing', '=', 0), ('move_raw_ids', '!=', [])]}" string="Validate" type="object" class="oe_highlight"
|
||||
confirm="There are no components to consume. Are you still sure you want to continue?" data-hotkey="g"/>
|
||||
<button name="button_mark_done" attrs="{'invisible': ['|', '|', ('state', 'in', ('draft', 'cancel', 'done', 'to_close')), ('qty_producing', '=', 0), ('move_raw_ids', '=', [])]}" string="Validate" type="object" class="oe_highlight" data-hotkey="g"/>
|
||||
<button name="button_mark_done" attrs="{'invisible': [
|
||||
'|',
|
||||
('move_raw_ids', '=', []),
|
||||
'&',
|
||||
'|',
|
||||
('state', 'not in', ('confirmed', 'progress')),
|
||||
('qty_producing', '!=', 0),
|
||||
('state', '!=', 'to_close')]}" string="Mark as Done" type="object" class="oe_highlight" data-hotkey="g"/>
|
||||
<button name="button_mark_done" attrs="{'invisible': [
|
||||
'|',
|
||||
('move_raw_ids', '!=', []),
|
||||
'&',
|
||||
'|',
|
||||
('state', 'not in', ('confirmed', 'progress')),
|
||||
('qty_producing', '!=', 0),
|
||||
('state', '!=', 'to_close')]}" string="Mark as Done" type="object" class="oe_highlight" data-hotkey="g"
|
||||
<field name="show_produce" invisible="1"/>
|
||||
<field name="show_produce_all" invisible="1"/>
|
||||
<button name="button_mark_done" invisible="not move_raw_ids or not show_produce" string="Produce" type="object" class="oe_highlight" data-hotkey="g"/>
|
||||
<button name="button_mark_done" invisible="not move_raw_ids or not show_produce_all" string="Produce All" type="object" class="oe_highlight" data-hotkey="g"/>
|
||||
<button name="button_mark_done" invisible="move_raw_ids or not show_produce" string="Produce" type="object" class="oe_highlight" data-hotkey="g"
|
||||
confirm="There are no components to consume. Are you still sure you want to continue?"/>
|
||||
<button name="action_confirm" attrs="{'invisible': [('state', '!=', 'draft')]}" string="Confirm" type="object" class="oe_highlight" data-hotkey="v"/>
|
||||
<button name="button_plan" attrs="{'invisible': ['|', '|', ('state', 'not in', ('confirmed', 'progress', 'to_close')), ('workorder_ids', '=', []), ('is_planned', '=', True)]}" type="object" string="Plan" class="oe_highlight" data-hotkey="x"/>
|
||||
<button name="button_unplan" type="object" string="Unplan" attrs="{'invisible': ['|', ('is_planned', '=', False), ('state', '=', 'cancel')]}" data-hotkey="x"/>
|
||||
<button name="action_assign" attrs="{'invisible': ['|', ('state', 'in', ('draft', 'done', 'cancel')), ('reserve_visible', '=', False)]}" string="Check availability" type="object" data-hotkey="q"/>
|
||||
<button name="do_unreserve" type="object" string="Unreserve" attrs="{'invisible': [('unreserve_visible', '=', False)]}" data-hotkey="w"/>
|
||||
<button name="button_scrap" type="object" string="Scrap" attrs="{'invisible': [('state', 'in', ('cancel', 'draft'))]}" data-hotkey="y"/>
|
||||
<field name="state" widget="statusbar" statusbar_visible="draft,confirmed,progress,done"/>
|
||||
<button name="action_toggle_is_locked" attrs="{'invisible': ['|', ('show_lock', '=', False), ('is_locked', '=', False)]}" string="Unlock" groups="mrp.group_mrp_manager" type="object" help="Unlock the manufacturing order to adjust what has been consumed or produced." data-hotkey="l"/>
|
||||
<button name="action_toggle_is_locked" attrs="{'invisible': ['|', ('show_lock', '=', False), ('is_locked', '=', True)]}" string="Lock" groups="mrp.group_mrp_manager" type="object" help="Lock the manufacturing order to prevent changes to what has been consumed or produced." data-hotkey="l"/>
|
||||
<field name="show_serial_mass_produce" invisible="1"/>
|
||||
<button name="action_serial_mass_produce_wizard" attrs="{'invisible': [('show_serial_mass_produce', '=', False)]}" string="Mass Produce" type="object"/>
|
||||
<button name="action_cancel" type="object" string="Cancel" data-hotkey="z"
|
||||
attrs="{'invisible': ['|', '|', ('id', '=', False), ('state', 'in', ('done', 'cancel')), ('confirm_cancel', '=', True)]}"/>
|
||||
<button name="action_cancel" type="object" string="Cancel" data-hotkey="z"
|
||||
attrs="{'invisible': ['|', '|', ('id', '=', False), ('state', 'in', ('done', 'cancel')), ('confirm_cancel', '=', False)]}"
|
||||
confirm="Some product moves have already been confirmed, this manufacturing order can't be completely cancelled. Are you still sure you want to process ?"/>
|
||||
<button name="button_unbuild" type="object" string="Unbuild" attrs="{'invisible': [('state', '!=', 'done')]}" data-hotkey="shift+v"/>
|
||||
<button name="button_mark_done" invisible="move_raw_ids or not show_produce_all" string="Produce All" type="object" class="oe_highlight" data-hotkey="g"
|
||||
confirm="There are no components to consume. Are you still sure you want to continue?"/>
|
||||
<button name="action_confirm" invisible="state != 'draft'" string="Confirm" type="object" class="oe_highlight" data-hotkey="q"/>
|
||||
<button name="button_plan" invisible="state not in ('confirmed', 'progress', 'to_close') or not workorder_ids or is_planned" type="object" string="Plan" class="oe_highlight" data-hotkey="z"/>
|
||||
<button name="button_unplan" type="object" string="Unplan" invisible="not is_planned or state in ['cancel', 'done']" data-hotkey="z"/>
|
||||
<button name="action_start" type="object" string="Start" invisible="state != 'confirmed'"/>
|
||||
<button name="action_assign" invisible="state in ('draft', 'done', 'cancel') or not reserve_visible" string="Check availability" type="object" data-hotkey="c"/>
|
||||
<button name="do_unreserve" type="object" string="Unreserve" invisible="not unreserve_visible" data-hotkey="w"/>
|
||||
<field name="state" widget="statusbar" statusbar_visible="draft,confirmed,done"/>
|
||||
<button name="action_cancel" type="object" string="Cancel" data-hotkey="x"
|
||||
invisible="not id or state in ('done', 'cancel')"
|
||||
confirm="Are you sure you want to cancel this manufacturing order?"
|
||||
confirm-label="Confirm"
|
||||
cancel-label="Discard"/>
|
||||
<button name="button_unbuild" type="object" string="Unbuild" invisible="state != 'done'" data-hotkey="shift+v"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<field name="reservation_state" invisible="1"/>
|
||||
<field name="date_planned_finished" invisible="1"/>
|
||||
<field name="date_finished" invisible="1"/>
|
||||
<field name="is_locked" invisible="1"/>
|
||||
<field name="qty_produced" invisible="1"/>
|
||||
<field name="unreserve_visible" invisible="1"/>
|
||||
|
|
@ -144,43 +220,62 @@
|
|||
<div class="oe_button_box" name="button_box">
|
||||
<button name="action_view_reception_report" string="Allocation" type="object"
|
||||
class="oe_stat_button" icon="fa-list"
|
||||
attrs="{'invisible': [('show_allocation', '=', False)]}"
|
||||
invisible="not show_allocation"
|
||||
groups="mrp.group_mrp_reception_report"/>
|
||||
<button class="oe_stat_button" name="action_view_mrp_production_childs" type="object" icon="fa-wrench" attrs="{'invisible': [('mrp_production_child_count', '=', 0)]}">
|
||||
<button class="oe_stat_button" name="action_view_mrp_production_childs" type="object" icon="fa-wrench" invisible="mrp_production_child_count == 0">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="mrp_production_child_count"/></span>
|
||||
<span class="o_stat_text">Child MO</span>
|
||||
</div>
|
||||
</button>
|
||||
<button class="oe_stat_button" name="action_view_mrp_production_sources" type="object" icon="fa-wrench" attrs="{'invisible': [('mrp_production_source_count', '=', 0)]}">
|
||||
<button class="oe_stat_button" name="action_view_mrp_production_sources" type="object" icon="fa-wrench" invisible="mrp_production_source_count == 0">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="mrp_production_source_count"/></span>
|
||||
<span class="o_stat_text">Source MO</span>
|
||||
</div>
|
||||
</button>
|
||||
<button class="oe_stat_button" name="action_view_mrp_production_backorders" type="object" icon="fa-wrench" attrs="{'invisible': [('mrp_production_backorder_count', '<', 2)]}">
|
||||
<button class="oe_stat_button" name="action_view_mrp_production_backorders" type="object" icon="fa-wrench" invisible="mrp_production_backorder_count < 2">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="mrp_production_backorder_count"/></span>
|
||||
<span class="o_stat_text">Backorders</span>
|
||||
</div>
|
||||
</button>
|
||||
<button class="oe_stat_button" name="action_view_mrp_production_unbuilds" type="object" icon="fa-undo" attrs="{'invisible': [('unbuild_count', '=', 0)]}">
|
||||
<button class="oe_stat_button" name="action_view_mrp_production_unbuilds" type="object" icon="fa-undo" invisible="unbuild_count == 0">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="unbuild_count"/></span>
|
||||
<span class="o_stat_text">Unbuilds</span>
|
||||
</div>
|
||||
</button>
|
||||
<button class="oe_stat_button" name="action_see_move_scrap" type="object" icon="fa-arrows-v" attrs="{'invisible': [('scrap_count', '=', 0)]}">
|
||||
<button class="oe_stat_button" name="action_see_move_scrap" type="object" icon="oi-arrows-v" invisible="scrap_count == 0">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="scrap_count"/></span>
|
||||
<span class="o_stat_text">Scraps</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="object" name="action_view_mo_delivery" class="oe_stat_button" icon="fa-truck" groups="base.group_user" attrs="{'invisible': [('delivery_count', '=', 0)]}">
|
||||
<button type="object" name="action_view_mo_delivery" class="oe_stat_button" icon="fa-truck" groups="base.group_user" invisible="delivery_count == 0">
|
||||
<field name="delivery_count" widget="statinfo" string="Transfers"/>
|
||||
</button>
|
||||
<button name="%(stock.action_stock_report)d" icon="fa-arrow-up" class="oe_stat_button" string="Traceability" type="action" states="done" groups="stock.group_production_lot"/>
|
||||
<button name="%(action_mrp_production_moves)d" type="action" string="Product Moves" class="oe_stat_button" icon="fa-exchange" attrs="{'invisible': [('state', 'not in', ('progress', 'done'))]}"/>
|
||||
<button name="%(stock.action_stock_report)d" icon="oi-arrow-up" class="oe_stat_button" string="Traceability" type="action" invisible="state != 'done'" groups="stock.group_production_lot">
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_text">Traceability</span>
|
||||
</div>
|
||||
</button>
|
||||
<button name="%(action_mrp_production_moves)d" type="action" class="oe_stat_button" icon="fa-exchange" invisible="state not in ('progress', 'done')">
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_text">Product Moves</span>
|
||||
</div>
|
||||
</button>
|
||||
<button name="%(action_report_mo_overview)d" type="action" class="oe_stat_button" icon="fa-bars">
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_text">Overview</span>
|
||||
</div>
|
||||
</button>
|
||||
<button class="oe_stat_button" name="action_view_serial_numbers" type="object" icon="fa-wrench" invisible="serial_numbers_count == 0">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="serial_numbers_count"/></span>
|
||||
<span class="o_stat_text">Serial Numbers</span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<h1 class="d-flex">
|
||||
|
|
@ -194,68 +289,85 @@
|
|||
<field name="use_create_components_lots" invisible="1"/>
|
||||
<field name="show_lot_ids" invisible="1"/>
|
||||
<field name="product_tracking" invisible="1"/>
|
||||
<field name="product_id" context="{'default_detailed_type': 'product'}" attrs="{'readonly': [('state', '!=', 'draft')]}" default_focus="1"/>
|
||||
<field name="allow_workorder_dependencies" invisible="1"/>
|
||||
<field name="product_id" context="{'default_is_storable': True}" readonly="state != 'draft'" default_focus="1" placeholder="Product to build..."/>
|
||||
<field name="product_tmpl_id" invisible="1"/>
|
||||
<field name="forecasted_issue" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="product_description_variants" attrs="{'invisible': [('product_description_variants', 'in', (False, ''))], 'readonly': [('state', '!=', 'draft')]}"/>
|
||||
<field name="product_description_variants" invisible="product_description_variants in (False, '')" readonly="state != 'draft'"/>
|
||||
<label for="product_qty" string="Quantity"/>
|
||||
<div class="o_row g-0 d-flex" name="qty">
|
||||
<div invisible="state == 'draft'" class="o_row flex-grow-1">
|
||||
<field name="qty_producing" class="text-start text-truncate" readonly="state == 'cancel' or (state == 'done' and is_locked) or product_tracking=='serial'" force_save="1"/>
|
||||
/
|
||||
</div>
|
||||
<field name="product_qty" class="oe_inline text-start text-truncate" invisible="state not in ('draft', 'done')" readonly="state != 'draft'" style="width:auto!important"/>
|
||||
<button type="action" name="%(mrp.action_change_production_qty)d"
|
||||
context="{'default_mo_id': id}" class="oe_link oe_inline" style="margin: 0px; padding: 0px;" invisible="state in ('draft', 'done', 'cancel') or not id">
|
||||
<field name="product_qty" class="oe_inline" readonly="state != 'draft'"/>
|
||||
</button>
|
||||
<label for="product_uom_id" string="" class="oe_inline"/>
|
||||
<field name="product_uom_id" options="{'no_open': True, 'no_create': True, 'quantity_field': 'product_qty'}" groups="uom.group_uom" widget="many2one_uom" readonly="state != 'draft'" class="flex-grow-0" style="width:auto!important"/>
|
||||
<span name="to_produce" class='fw-bold text-nowrap'>To Produce</span>
|
||||
<button type="object" name="action_product_forecast_report" title="Forecast Report" icon="fa-area-chart" invisible="forecasted_issue"/>
|
||||
<button type="object" name="action_product_forecast_report" title="Forecast Report" icon="fa-area-chart" invisible="not forecasted_issue" class="text-danger"/>
|
||||
</div>
|
||||
<label for="bom_id" name="bom_label"/>
|
||||
<div class='o_row' name="bom_div">
|
||||
<field name='is_outdated_bom' invisible='1'/>
|
||||
<field name="bom_id"
|
||||
context="{'default_product_tmpl_id': product_tmpl_id}" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
|
||||
</div>
|
||||
<label for="product_qty" string="Quantity"/>
|
||||
<div class="d-flex flex-row align-items-start">
|
||||
<field name="qty_producing" class="w-auto" attrs="{'readonly': ['|', ('state', '=', 'cancel'), '&', ('state', '=', 'done'), ('is_locked', '=', True)], 'invisible': [('state', '=', 'draft')]}"/>
|
||||
<span attrs="{'invisible': [('state', '=', 'draft')]}">/</span>
|
||||
<field name="product_qty" class="oe_inline text-start" attrs="{'readonly': [('state', '!=', 'draft')], 'invisible': [('state', 'not in', ('draft', 'done'))]}"/>
|
||||
<button type="action" name="%(mrp.action_change_production_qty)d"
|
||||
context="{'default_mo_id': id}" class="oe_link oe_inline py-0" style="margin: 0px; padding: 0px;" attrs="{'invisible': ['|', ('state', 'in', ('draft', 'done','cancel')), ('id', '=', False)]}">
|
||||
<field name="product_qty" class="oe_inline" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
|
||||
context="{'default_product_tmpl_id': product_tmpl_id}"
|
||||
invisible="state != 'draft' and not bom_id"
|
||||
readonly="state != 'draft'"/>
|
||||
<button name="action_generate_bom" type="object" icon="fa-plus"
|
||||
title="Generate a new BoM from this Manufacturing Order" groups="mrp.group_mrp_manager"
|
||||
invisible="not show_generate_bom">
|
||||
<span>Generate BOM</span>
|
||||
</button>
|
||||
<label for="product_uom_id" string="" class="oe_inline flex-grow-1"/>
|
||||
<field name="product_uom_category_id" invisible="1"/>
|
||||
<field name="product_uom_id" groups="!uom.group_uom" invisible="1"/>
|
||||
<field name="product_uom_id" options="{'no_open': True, 'no_create': True}" groups="uom.group_uom" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
|
||||
<span class='fw-bold text-nowrap'>To Produce</span>
|
||||
<button type="object" name="action_product_forecast_report" title="Forecast Report" icon="fa-area-chart" attrs="{'invisible': [('forecasted_issue', '=', True)]}" class="py-0" />
|
||||
<button type="object" name="action_product_forecast_report" title="Forecast Report" icon="fa-area-chart" attrs="{'invisible': [('forecasted_issue', '=', False)]}" class="text-danger py-0"/>
|
||||
<button name="action_update_bom" string="Update BoM" type="object"
|
||||
title="Note that another version of this BOM is available." class="text-danger"
|
||||
invisible="not is_outdated_bom or state not in ['draft', 'confirmed']"/>
|
||||
</div>
|
||||
<label for="lot_producing_id" attrs="{'invisible': ['|', ('state', '=', 'draft'), ('product_tracking', 'in', ('none', False))]}"/>
|
||||
<div class="o_row" attrs="{'invisible': ['|', ('state', '=', 'draft'), ('product_tracking', 'in', ('none', False))]}">
|
||||
<field name="lot_producing_id"
|
||||
context="{'default_product_id': product_id, 'default_company_id': company_id}" attrs="{'invisible': [('product_tracking', 'in', ('none', False))]}"/>
|
||||
<button name="action_generate_serial" type="object" class="btn btn-primary fa fa-plus-square-o" aria-label="Creates a new serial/lot number" title="Creates a new serial/lot number" role="img" attrs="{'invisible': ['|', ('product_tracking', 'in', ('none', False)), ('lot_producing_id', '!=', False)]}"/>
|
||||
<label for="lot_producing_ids" invisible="state in ('draft', 'cancel') or product_tracking in ('none', False) or (state == 'done' and product_tracking == 'serial' and product_qty > 1)"/>
|
||||
<div class="o_row" invisible="state in ('draft', 'cancel') or product_tracking in ('none', False) or (state == 'done' and product_tracking == 'serial' and product_qty > 1)">
|
||||
<field name="lot_producing_ids" widget="many2many_tags" options="{'edit_tags': True}"
|
||||
invisible="product_tracking in ('none', False) or (product_tracking == 'serial' and (product_qty > 1 or serial_numbers_count > 1))"
|
||||
readonly="lot_producing_ids" force_save="1" context="{'default_product_id': product_id}"/>
|
||||
<button name="action_generate_serial" type="object" class="btn btn-primary o_right_alignment" string="Generate Serial" aria-label="Creates a new serial number" title="Creates a new serial number" role="img" invisible="product_tracking in ('none', 'lot', False) or lot_producing_ids"/>
|
||||
<button name="action_generate_serial" type="object" class="btn btn-secondary o_right_alignment" string="Generate Serial" aria-label="Creates a new serial number" title="Creates a new serial number" role="img" invisible="product_tracking in ('none', 'lot', False) or not lot_producing_ids or product_qty == 1"/>
|
||||
<button name="action_generate_serial" type="object" class="btn btn-primary o_right_alignment" string="Generate Lot" aria-label="Creates a new lot number" title="Creates a new lot number" role="img" invisible="product_tracking in ('none', 'serial', False) or lot_producing_ids"/>
|
||||
<button name="action_clear_lot_producing_ids" type="object" class="btn btn-secondary o_right_alignment" string="Clear" aria-label="Clears the selected lot/serial number" title="Clears the selected lot/serial number" role="img" invisible="state == 'done' or (product_tracking == 'serial' and product_qty > 1) or not lot_producing_ids"/>
|
||||
</div>
|
||||
</group>
|
||||
<group name="group_extra_info">
|
||||
<label for="date_planned_start"/>
|
||||
<div class="o_row">
|
||||
<field name="date_planned_start"
|
||||
attrs="{'readonly': [('state', 'in', ['done', 'cancel'])]}"
|
||||
decoration-warning="state not in ('done', 'cancel') and date_planned_start < now"
|
||||
decoration-danger="state not in ('done', 'cancel') and date_planned_start < current_date"
|
||||
decoration-bf="state not in ('done', 'cancel') and (date_planned_start < current_date or date_planned_start < now)"/>
|
||||
<label name="scheduled_date" for="date_start" string="Scheduled Date" invisible="state in ['progress', 'to_close', 'done', 'cancel']"/>
|
||||
<label name="start_date" for="date_start" string="Start Date" invisible="state not in ['progress', 'to_close', 'done', 'cancel']"/>
|
||||
<div class="o_row" name="date_start">
|
||||
<field name="date_start"
|
||||
readonly="state in ['done', 'to_close', 'cancel']"
|
||||
decoration-warning="state not in ('done', 'cancel') and date_start < now"
|
||||
decoration-danger="state not in ('done', 'cancel') and date_deadline and date_deadline < date_finished"
|
||||
help="Date at which you plan to start.
|
||||
Red if the scheduled end is forecasted after the production order deadline.
|
||||
Orange if the scheduled date is in the past."/>
|
||||
<field name="delay_alert_date" invisible="1"/>
|
||||
<field nolabel="1" name="json_popover" widget="stock_rescheduling_popover" attrs="{'invisible': [('json_popover', '=', False)]}"/>
|
||||
<field nolabel="1" name="json_popover" widget="stock_rescheduling_popover" invisible="not json_popover"/>
|
||||
</div>
|
||||
<field name="components_availability_state" invisible="1"/>
|
||||
<field name="components_availability" attrs="{'invisible': [('state', 'not in', ['confirmed', 'progress'])]}"
|
||||
<field name="components_availability" invisible="state not in ['confirmed', 'progress']"
|
||||
decoration-success="reservation_state == 'assigned' or components_availability_state == 'available'"
|
||||
decoration-warning="reservation_state != 'assigned' and components_availability_state in ('expected', 'available')"
|
||||
decoration-danger="reservation_state != 'assigned' and components_availability_state == 'late'"/>
|
||||
<field name="user_id"/>
|
||||
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}" attrs="{'readonly': [('state', '!=', 'draft')]}" force_save="1"/>
|
||||
decoration-danger="reservation_state != 'assigned' and components_availability_state in ('late', 'unavailable')"/>
|
||||
<field name="user_id" widget="many2one_avatar" readonly="state in ['cancel', 'done']"/>
|
||||
<field name="show_final_lots" invisible="1"/>
|
||||
<field name="production_location_id" invisible="1" readonly="1"/>
|
||||
<field name="move_finished_ids" invisible="1" attrs="{'readonly': ['|', ('state', '=', 'cancel'), '&', ('state', '=', 'done'), ('is_locked', '=', True)]}">
|
||||
<tree editable="bottom">
|
||||
<field name="product_id"/>
|
||||
<field name="product_uom_qty"/>
|
||||
<field name="product_uom"/>
|
||||
<field name="move_finished_ids" invisible="1" readonly="state == 'cancel' or (state == 'done' and is_locked)">
|
||||
<list editable="bottom">
|
||||
<field name="product_id" readonly="state == 'done'"/>
|
||||
<field name="product_uom_qty" readonly="state == 'done'"/>
|
||||
<field name="product_uom" groups="uom.group_uom" widget="many2one_uom"/>
|
||||
<field name="operation_id"/>
|
||||
<field name="byproduct_id"/>
|
||||
<field name="name"/>
|
||||
<field name="date_deadline"/>
|
||||
<field name="picking_type_id"/>
|
||||
<field name="location_id"/>
|
||||
|
|
@ -263,12 +375,10 @@
|
|||
<field name="company_id"/>
|
||||
<field name="warehouse_id"/>
|
||||
<field name="origin"/>
|
||||
<field name="group_id"/>
|
||||
<field name="propagate_cancel"/>
|
||||
<field name="move_dest_ids"/>
|
||||
<field name="state"/>
|
||||
<!-- Useless as the editable in tree declaration -> For Form Test-->
|
||||
<field name="product_uom_category_id"/>
|
||||
<field name="allowed_operation_ids"/>
|
||||
<!--
|
||||
Required for test_00_mrp_byproduct
|
||||
|
|
@ -280,159 +390,166 @@
|
|||
and `quantity_done` is not within the finished move views,
|
||||
(byproduct moves are a subset of finished moves)
|
||||
the `quantity_done` of byproducts is not updated correctly with the onchange
|
||||
Another solution is to add `self.env.user.groups_id += self.env.ref('mrp.group_mrp_byproducts')`
|
||||
Another solution is to add `self.env.user.group_ids += self.env.ref('mrp.group_mrp_byproducts')`
|
||||
to the test `test_00_mrp_byproduct`, which could makes sense as it's a test testing the byproducts features,
|
||||
for which you should have the byproducts group to have access to,
|
||||
but it seemed better to keep the feature working even if you do not see the byproducts features with your user.
|
||||
That being said, the best would be to have the byproducts feature working without relying on anything in the view,
|
||||
e.g. so the byproducts feature works with xmlrpc calls.
|
||||
-->
|
||||
<field name="quantity_done"/>
|
||||
<field name="quantity"/>
|
||||
<field name="picked"/>
|
||||
<!-- Required for test_fifo_byproduct -->
|
||||
<field name="cost_share"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Components" name="components">
|
||||
<field name="move_raw_ids"
|
||||
widget="mrp_production_components_x2many"
|
||||
context="{'default_date': date_planned_start, 'default_date_deadline': date_planned_start, 'default_location_id': location_src_id, 'default_location_dest_id': production_location_id,
|
||||
'default_warehouse_id': warehouse_id, 'default_state': 'draft', 'default_raw_material_production_id': id, 'default_picking_type_id': picking_type_id, 'default_company_id': company_id}"
|
||||
attrs="{'readonly': ['|', ('state', '=', 'cancel'), '&', ('state', '=', 'done'), ('is_locked', '=', True)]}" options="{'delete': [('state', '=', 'draft')]}">
|
||||
<tree default_order="is_done, manual_consumption desc, sequence" editable="bottom">
|
||||
<field name="product_id" force_save="1" required="1" context="{'default_detailed_type': 'product'}" attrs="{'readonly': ['|', '|', ('move_lines_count', '>', 0), ('state', '=', 'cancel'), '&', ('state', '!=', 'draft'), ('additional', '=', False) ]}"/>
|
||||
<field name="location_id" string="From" readonly="1" force_save="1" groups="stock.group_stock_multi_locations" optional="show"/>
|
||||
context="{'default_date': date_start, 'default_date_deadline': date_start, 'default_location_id': location_src_id, 'default_location_dest_id': production_location_id, 'default_warehouse_id': warehouse_id, 'default_state': 'draft', 'default_raw_material_production_id': id, 'default_picking_type_id': picking_type_id, 'default_company_id': company_id, 'form_view_ref': 'mrp.view_mrp_stock_move_operations', 'active_mo_id': id}"
|
||||
|
||||
readonly="state == 'cancel' or (state == 'done' and is_locked)">
|
||||
<list editable="bottom">
|
||||
<control>
|
||||
<create string="Add a line"/>
|
||||
<button name="action_add_from_catalog_raw" string="Catalog" type="object" class="px-4 btn-link" context="{'order_id': parent.id}"/>
|
||||
</control>
|
||||
<field name="product_id" force_save="1" context="{'default_is_storable': True}" required="1" readonly="move_lines_count > 0 or state == 'cancel' or (state != 'draft' and not additional)" domain="[('type', '=', 'consu')]"/>
|
||||
<field name="forecast_availability" column_invisible="parent.state in ['done', 'cancel']" string="" widget="forecast_widget"/>
|
||||
<field name="location_id" string="From" readonly="1" force_save="1" groups="stock.group_stock_multi_locations" optional="hide"/>
|
||||
<!-- test_immediate_validate_uom_2, test_product_produce_different_uom -->
|
||||
<field name="product_uom" invisible="1"/>
|
||||
<field name="propagate_cancel" invisible="1"/>
|
||||
<field name="price_unit" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="product_uom_category_id" invisible="1"/>
|
||||
<field name="name" invisible="1"/>
|
||||
<field name="allowed_operation_ids" invisible="1"/>
|
||||
<field name="unit_factor" invisible="1"/>
|
||||
<field name="date_deadline" invisible="1" force_save="1"/>
|
||||
<field name="date" invisible="1"/>
|
||||
<field name="additional" invisible="1"/>
|
||||
<field name="picking_type_id" invisible="1"/>
|
||||
<field name="has_tracking" invisible="1"/>
|
||||
<field name="operation_id" invisible="1"/>
|
||||
<field name="is_done" invisible="1"/>
|
||||
<field name="bom_line_id" invisible="1"/>
|
||||
<field name="sequence" invisible="1"/>
|
||||
<field name="warehouse_id" invisible="1"/>
|
||||
<field name="is_locked" invisible="1"/>
|
||||
<field name="move_lines_count" invisible="1"/>
|
||||
<field name="location_dest_id" domain="[('id', 'child_of', parent.location_dest_id)]" invisible="1"/>
|
||||
<field name="state" invisible="1" force_save="1"/>
|
||||
<field name="should_consume_qty" invisible="1"/>
|
||||
<field name="product_uom_qty" widget="mrp_should_consume" force_save="1" string="To Consume" attrs="{'readonly': ['&', ('parent.state', '!=', 'draft'), '|', '&', ('parent.state', 'not in', ('confirmed', 'progress', 'to_close')), ('parent.is_planned', '!=', True), '&', ('state', '!=', 'draft'), ('parent.is_locked', '=', True)]}" width="1"/>
|
||||
<field name="product_uom" attrs="{'readonly': [('state', '!=', 'draft'), ('id', '!=', False)]}" options="{'no_open': True, 'no_create': True}" groups="uom.group_uom"/>
|
||||
<field name="product_type" invisible="1"/>
|
||||
<field name="product_qty" invisible="1" readonly="1"/>
|
||||
<field name="reserved_availability" invisible="1"/>
|
||||
<field name="forecast_expected_date" invisible="1"/>
|
||||
<!-- Button are used in state draft to doesn't have the name of the column "Reserved"-->
|
||||
<button type="object" name="action_product_forecast_report" title="Forecast Report" icon="fa-area-chart" attrs="{'column_invisible': [('parent.state', '!=', 'draft')], 'invisible': [('forecast_availability', '<', 0)]}"/>
|
||||
<button type="object" name="action_product_forecast_report" title="Forecast Report" icon="fa-area-chart text-danger" attrs="{'column_invisible': [('parent.state', '!=', 'draft')], 'invisible': [('forecast_availability', '>=', 0)]}"/>
|
||||
<field name="forecast_availability" string="Reserved" attrs="{'column_invisible': [('parent.state', 'in', ('draft', 'done'))]}" widget="forecast_widget"/>
|
||||
<field name="quantity_done" string="Consumed"
|
||||
decoration-success="not is_done and (quantity_done - should_consume_qty == 0)"
|
||||
decoration-warning="not is_done and (quantity_done - should_consume_qty > 0.0001)"
|
||||
attrs="{'column_invisible': [('parent.state', '=', 'draft')], 'readonly': [('has_tracking', '!=','none')]}"
|
||||
force_save="1" widget="mrp_consumed"/>
|
||||
<field name="manual_consumption" invisible="1" force_save="1"/>
|
||||
<field name="show_details_visible" invisible="1"/>
|
||||
<field name="product_uom" column_invisible="True"/>
|
||||
<field name="propagate_cancel" column_invisible="True"/>
|
||||
<field name="price_unit" column_invisible="True"/>
|
||||
<field name="company_id" column_invisible="True"/>
|
||||
<field name="allowed_operation_ids" column_invisible="True"/>
|
||||
<field name="unit_factor" column_invisible="True"/>
|
||||
<field name="date_deadline" column_invisible="True" force_save="1"/>
|
||||
<field name="date" column_invisible="True"/>
|
||||
<field name="additional" column_invisible="True"/>
|
||||
<field name="picking_type_id" column_invisible="True"/>
|
||||
<field name="is_storable" column_invisible="True"/>
|
||||
<field name="has_tracking" column_invisible="True"/>
|
||||
<field name="operation_id" column_invisible="True"/>
|
||||
<field name="bom_line_id" column_invisible="True"/>
|
||||
<field name="sequence" column_invisible="True"/>
|
||||
<field name="warehouse_id" column_invisible="True"/>
|
||||
<field name="is_locked" column_invisible="True"/>
|
||||
<field name="move_lines_count" column_invisible="True"/>
|
||||
<field name="location_dest_id" domain="[('id', 'child_of', parent.location_dest_id)]" column_invisible="True"/>
|
||||
<field name="state" column_invisible="True" force_save="1"/>
|
||||
<field name="should_consume_qty" column_invisible="True"/>
|
||||
<field name="product_uom_qty" force_save="1" string="To Consume" column_invisible="not parent.show_produce_all" readonly="parent.state != 'draft' and ((parent.state not in ('confirmed', 'progress', 'to_close') and not parent.is_planned) or (parent.is_locked and state != 'draft'))"/>
|
||||
<field name="product_uom_qty" widget="mrp_should_consume" force_save="1" string="To Consume" column_invisible="parent.show_produce_all" readonly="parent.state != 'draft' and ((parent.state not in ('confirmed', 'progress', 'to_close') and not parent.is_planned) or (parent.is_locked and state != 'draft'))"/>
|
||||
<field name="product_qty" readonly="1" column_invisible="True"/>
|
||||
<field name="forecast_expected_date" column_invisible="True"/>
|
||||
<field name="quantity" string="Consumed"
|
||||
decoration-success="(state not in ['done', 'cancel']) and (quantity - (should_consume_qty if parent.qty_producing else product_uom_qty) == 0)"
|
||||
decoration-warning="(state not in ['done', 'cancel']) and (quantity - (should_consume_qty if parent.qty_producing else product_uom_qty) > 0.0001)"
|
||||
column_invisible="parent.state == 'draft'"
|
||||
decoration-info="manual_consumption"
|
||||
decoration-muted="not manual_consumption"
|
||||
decoration-bf="manual_consumption"
|
||||
force_save="1"/>
|
||||
<field name="product_uom" readonly="state != 'draft' and id" options="{'no_open': True, 'no_create': True}" groups="uom.group_uom" widget="many2one_uom"/>
|
||||
<field name="picked" column_invisible="True"/>
|
||||
<field name="manual_consumption" column_invisible="True" force_save="1"/>
|
||||
<field name="show_details_visible" column_invisible="True"/>
|
||||
<field name="lot_ids" widget="many2many_tags"
|
||||
optional="hide"
|
||||
readonly="1"
|
||||
string="Lot/Serial Numbers"
|
||||
help="Displays the consumed Lot/Serial Numbers."
|
||||
groups="stock.group_production_lot"
|
||||
attrs="{'invisible': ['|', ('show_details_visible', '=', False), ('parent.state', '=', 'draft')],
|
||||
'column_invisible': [('parent.show_lot_ids', '=', False)]}"
|
||||
readonly="1"
|
||||
column_invisible="not parent.show_lot_ids or parent.state == 'draft'"
|
||||
invisible="not show_details_visible"
|
||||
options="{'create': [('parent.use_create_components_lots', '!=', False)]}"
|
||||
context="{'default_company_id': company_id, 'default_product_id': product_id}"
|
||||
domain="[('product_id','=',product_id)]"
|
||||
/>
|
||||
<field name="group_id" invisible="1"/>
|
||||
<button name="action_show_details" type="object" title="Show Details" icon="fa-list" context="{'default_product_uom_qty': 0}" attrs="{'invisible': ['|', ('show_details_visible', '=', False), ('has_tracking', '=','none')]}"/>
|
||||
<button class="o_optional_button btn btn-light" name="action_show_details" type="object" title="Show Details" icon="fa-list" context="{'default_product_uom_qty': 0}" attrs="{'invisible': ['|', ('has_tracking', '!=','none'), ('show_details_visible', '=', False)]}"/>
|
||||
</tree>
|
||||
context="{'default_product_id': product_id}"
|
||||
domain="[('product_id','=',product_id)]"/>
|
||||
<button name="action_show_details" type="object" title="Show Details" string="Details" context="{'default_product_uom_qty': 0}" invisible="not show_details_visible or has_tracking == 'none'"/>
|
||||
<button class="o_optional_button btn" name="action_show_details" type="object" title="Show Details" string="Details" context="{'default_product_uom_qty': 0}" invisible="has_tracking != 'none' or not show_details_visible"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Work Orders" name="operations" groups="mrp.group_mrp_routings">
|
||||
<field name="workorder_ids" attrs="{'readonly': ['|', ('state', '=', 'cancel'), '&', ('state', '=', 'done'), ('is_locked', '=', True)]}" context="{'tree_view_ref': 'mrp.mrp_production_workorder_tree_editable_view', 'default_product_uom_id': product_uom_id, 'from_manufacturing_order': True}"/>
|
||||
<field name="workorder_ids"
|
||||
context="{'list_view_ref': 'mrp.mrp_production_workorder_tree_editable_view_mo_form', 'from_manufacturing_order': True}"
|
||||
options="{'create': [('id', '!=', False), ('state', '!=', 'done')]}"
|
||||
/>
|
||||
</page>
|
||||
<page string="By-Products" name="finished_products" groups="mrp.group_mrp_byproducts">
|
||||
<field name="move_byproduct_ids" context="{'default_date': date_planned_finished, 'default_warehouse_id': warehouse_id, 'default_date_deadline': date_deadline, 'default_location_id': production_location_id, 'default_location_dest_id': location_dest_id, 'default_state': 'draft', 'default_production_id': id, 'default_picking_type_id': picking_type_id, 'default_company_id': company_id}" attrs="{'readonly': ['|', ('state', '=', 'cancel'), '&', ('state', '=', 'done'), ('is_locked', '=', True)]}" options="{'delete': [('state', '=', 'draft')]}">
|
||||
<tree default_order="is_done,sequence" decoration-muted="is_done" editable="bottom">
|
||||
<field name="product_id" context="{'default_detailed_type': 'product'}" domain="[('id', '!=', parent.product_id)]" required="1" force_save="1" attrs="{'readonly': ['|', '|', ('move_lines_count', '>', 0), ('state', '=', 'cancel'), '&', ('state', '!=', 'draft'), ('additional', '=', False) ]}"/>
|
||||
<field name="move_byproduct_ids"
|
||||
context="{'default_date': date_finished, 'default_date_deadline': date_deadline, 'default_warehouse_id': warehouse_id, 'default_location_id': production_location_id, 'default_location_dest_id': location_dest_id, 'default_state': 'draft', 'default_production_id': id, 'default_picking_type_id': picking_type_id, 'default_company_id': company_id, 'form_view_ref': 'mrp.view_mrp_stock_move_operations'}"
|
||||
readonly="state == 'cancel' or (state == 'done' and is_locked)" options="{'delete': [('state', '=', 'draft')]}">
|
||||
<list decoration-muted="state in ['done', 'cancel']" editable="bottom">
|
||||
<control>
|
||||
<create string="Add a line"/>
|
||||
<button name="action_add_from_catalog_byproduct" string="Catalog" type="object" class="px-4 btn-link" context="{'order_id': parent.id}"/>
|
||||
</control>
|
||||
<field name="product_id" context="{'default_is_storable': True}" domain="[('type', '=', 'consu')]" required="1" readonly="move_lines_count > 0 or state == 'cancel' or (state != 'draft' and not additional)"/>
|
||||
<field name="location_dest_id" string="To" readonly="1" force_save="1" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="product_uom_category_id" invisible="1"/>
|
||||
<field name="name" invisible="1"/>
|
||||
<field name="allowed_operation_ids" invisible="1"/>
|
||||
<field name="unit_factor" invisible="1"/>
|
||||
<field name="date" invisible="1"/>
|
||||
<field name="date_deadline" invisible="1" force_save="1"/>
|
||||
<field name="additional" invisible="1"/>
|
||||
<field name="picking_type_id" invisible="1"/>
|
||||
<field name="has_tracking" invisible="1"/>
|
||||
<field name="operation_id" invisible="1"/>
|
||||
<field name="is_done" invisible="1"/>
|
||||
<field name="bom_line_id" invisible="1"/>
|
||||
<field name="sequence" invisible="1"/>
|
||||
<field name="location_id" invisible="1"/>
|
||||
<field name="warehouse_id" invisible="1"/>
|
||||
<field name="is_locked" invisible="1"/>
|
||||
<field name="move_lines_count" invisible="1"/>
|
||||
<field name="state" invisible="1" force_save="1"/>
|
||||
<field name="product_uom_qty" string="To Produce" force_save="1" attrs="{'readonly': ['&', ('parent.state', '!=', 'draft'), '|', '&', ('parent.state', 'not in', ('confirmed', 'progress', 'to_close')), ('parent.is_planned', '!=', True), ('parent.is_locked', '=', True)]}"/>
|
||||
<field name="quantity_done" string="Produced" attrs="{'column_invisible': [('parent.state', '=', 'draft')], 'readonly': [('has_tracking', '=', True)]}"/>
|
||||
<field name="product_uom" groups="uom.group_uom"/>
|
||||
<field name="company_id" column_invisible="True"/>
|
||||
<field name="allowed_operation_ids" column_invisible="True"/>
|
||||
<field name="unit_factor" column_invisible="True"/>
|
||||
<field name="date" column_invisible="True"/>
|
||||
<field name="date_deadline" column_invisible="True" force_save="1"/>
|
||||
<field name="additional" column_invisible="True"/>
|
||||
<field name="picking_type_id" column_invisible="True"/>
|
||||
<field name="has_tracking" column_invisible="True"/>
|
||||
<field name="operation_id" column_invisible="True"/>
|
||||
<field name="bom_line_id" column_invisible="True"/>
|
||||
<field name="byproduct_id" column_invisible="True"/>
|
||||
<field name="sequence" column_invisible="True"/>
|
||||
<field name="location_id" column_invisible="True"/>
|
||||
<field name="warehouse_id" column_invisible="True"/>
|
||||
<field name="is_locked" column_invisible="True"/>
|
||||
<field name="move_lines_count" column_invisible="True"/>
|
||||
<field name="state" column_invisible="True" force_save="1"/>
|
||||
<field name="product_uom_qty" string="To Produce" force_save="1" readonly="parent.state != 'draft' and ((parent.state not in ('confirmed', 'progress', 'to_close') and not parent.is_planned) or parent.is_locked)"/>
|
||||
<field name="quantity" column_invisible="parent.state == 'draft'" readonly="has_tracking != 'none'"/>
|
||||
<field name="picked" string="Produced" column_invisible="parent.state == 'draft'" optional="show"/>
|
||||
<field name="product_uom" groups="uom.group_uom" widget="many2one_uom"/>
|
||||
<field name="cost_share" optional="hide"/>
|
||||
<field name="show_details_visible" invisible="1"/>
|
||||
<field name="show_details_visible" column_invisible="True"/>
|
||||
<field name="lot_ids" widget="many2many_tags"
|
||||
optional="hide"
|
||||
string="Lot/Serial Numbers"
|
||||
help="Displays the produced Lot/Serial Numbers."
|
||||
groups="stock.group_production_lot"
|
||||
attrs="{'invisible': ['|', '|', ('show_details_visible', '=', False), ('has_tracking', '!=', 'serial'), ('parent.state', '=', 'draft')]}"
|
||||
readonly="1"
|
||||
column_invisible="not parent.show_lot_ids or parent.state == 'draft'"
|
||||
invisible="not show_details_visible"
|
||||
options="{'create': [('parent.use_create_components_lots', '!=', False)]}"
|
||||
context="{'default_company_id': company_id, 'default_product_id': product_id}"
|
||||
domain="[('product_id','=',product_id)]"
|
||||
/>
|
||||
<button name="action_show_details" type="object" title="Show Details" icon="fa-list" attrs="{'invisible': ['|', ('has_tracking', '=','none'), ('show_details_visible', '=', False)]}"/>
|
||||
<button class="o_optional_button btn btn-light" name="action_show_details" type="object" title="Show Details" icon="fa-list" attrs="{'invisible': ['|', ('has_tracking', '!=','none'), ('show_details_visible', '=', False)]}"/>
|
||||
</tree>
|
||||
context="{'default_product_id': product_id}"
|
||||
domain="[('product_id','=',product_id)]"/>
|
||||
<button name="action_show_details" type="object" title="Show Details" icon="fa-list" invisible="has_tracking == 'none' or not show_details_visible"/>
|
||||
<button class="o_optional_button btn btn-light" name="action_show_details" type="object" title="Show Details" icon="fa-list" invisible="has_tracking != 'none' or not show_details_visible"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Miscellaneous" name="miscellaneous">
|
||||
<group>
|
||||
<group>
|
||||
<field name="picking_type_id" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
|
||||
<field name="location_src_id" groups="stock.group_stock_multi_locations" options="{'no_create': True}" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
|
||||
<field name="picking_type_id" readonly="state not in ('draft', 'confirmed')"/>
|
||||
<field name="location_src_id" groups="stock.group_stock_multi_locations" options="{'no_create': True}" readonly="state != 'draft'"/>
|
||||
<field name="location_src_id" groups="!stock.group_stock_multi_locations" invisible="1"/>
|
||||
<field name="warehouse_id" invisible="1"/>
|
||||
<field name="location_dest_id" groups="stock.group_stock_multi_locations" options="{'no_create': True}" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
|
||||
<field name="location_dest_id" groups="stock.group_stock_multi_locations" options="{'no_create': True}" readonly="state != 'draft'"/>
|
||||
<field name="location_dest_id" groups="!stock.group_stock_multi_locations" invisible="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="origin"/>
|
||||
<field name="date_deadline"
|
||||
attrs="{'invisible': ['|', ('state', 'in', ('done', 'cancel')), ('date_deadline', '=', False)]}"
|
||||
decoration-danger="date_deadline and date_deadline < current_date"
|
||||
decoration-bf="date_deadline and date_deadline < current_date"/>
|
||||
<field name="origin" readonly="state in ['cancel', 'done']"/>
|
||||
<field name="date_deadline"/>
|
||||
<field name="is_delayed" invisible="True"/>
|
||||
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}" readonly="state != 'draft'" force_save="1"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids"/>
|
||||
<field name="activity_ids"/>
|
||||
<field name="message_ids"/>
|
||||
</div>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
@ -442,36 +559,26 @@
|
|||
<field name="model">mrp.production</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban class="o_kanban_mobile" sample="1">
|
||||
<field name="name"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom_id" options="{'no_open':True,'no_create':True}"/>
|
||||
<field name="date_planned_start"/>
|
||||
<field name="date_start"/>
|
||||
<field name="state"/>
|
||||
<field name="activity_state"/>
|
||||
<progressbar field="activity_state" colors='{"planned": "success", "today": "warning", "overdue": "danger"}'/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div t-attf-class="oe_kanban_card oe_kanban_global_click">
|
||||
<div class="o_kanban_record_top">
|
||||
<field name="priority" widget="priority"/>
|
||||
<div class="o_kanban_record_headings mt4 ms-1">
|
||||
<strong class="o_kanban_record_title"><span><t t-esc="record.product_id.value"/></span></strong>
|
||||
</div>
|
||||
<span class="float-end text-end"><t t-esc="record.product_qty.value"/> <small><t t-esc="record.product_uom_id.value"/></small></span>
|
||||
</div>
|
||||
<div class="o_kanban_record_bottom">
|
||||
<div class="oe_kanban_bottom_left text-muted">
|
||||
<span><t t-esc="record.name.value"/> <t t-esc="record.date_planned_start.value and record.date_planned_start.value.split(' ')[0] or False"/></span>
|
||||
<field name="activity_ids" widget="kanban_activity"/>
|
||||
<field name="delay_alert_date" invisible="1"/>
|
||||
<field nolabel="1" name="json_popover" widget="stock_rescheduling_popover" attrs="{'invisible': [('json_popover', '=', False)]}"/>
|
||||
</div>
|
||||
<div class="oe_kanban_bottom_right">
|
||||
<span t-attf-class="badge #{['cancel'].indexOf(record.state.raw_value) > -1 ? 'bg-danger' : ['draft'].indexOf(record.state.raw_value) > -1 ? 'bg-200' : ['progress'].indexOf(record.state.raw_value) > -1 ? 'bg-warning text-dark' : ['done', 'to_close'].indexOf(record.state.raw_value) > -1 ? 'bg-success' : 'bg-primary'}"><t t-esc="record.state.value"/></span>
|
||||
</div>
|
||||
</div>
|
||||
<t t-name="card">
|
||||
<div class="d-flex mb-1">
|
||||
<field name="priority" widget="priority"/>
|
||||
<field name="product_id" class="fw-bolder fs-6 ms-1"/>
|
||||
<field name="product_qty" class="ms-auto flex-shrink-0"/>
|
||||
<field name="product_uom_id" class="small ms-1 flex-shrink-0" groups="uom.group_uom"/>
|
||||
</div>
|
||||
<footer class="text-muted">
|
||||
<div class="d-flex">
|
||||
<field name="name" class="me-1"/>
|
||||
<field name="date_start" widget="datetime" options="{'show_time': false}"/>
|
||||
<field name="activity_ids" widget="kanban_activity"/>
|
||||
</div>
|
||||
<field name="json_popover" widget="stock_rescheduling_popover" invisible="not json_popover"/>
|
||||
<span t-attf-class="ms-auto badge #{['cancel'].indexOf(record.state.raw_value) > -1 ? 'text-bg-danger' : ['draft'].indexOf(record.state.raw_value) > -1 ? 'bg-200' : ['progress'].indexOf(record.state.raw_value) > -1 ? 'text-bg-warning' : ['done', 'to_close'].indexOf(record.state.raw_value) > -1 ? 'text-bg-success' : 'text-bg-primary'}"><field name="state"/></span>
|
||||
</footer>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
|
|
@ -483,8 +590,8 @@
|
|||
<field name="model">mrp.production</field>
|
||||
<field eval="2" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<calendar date_start="date_planned_start" date_stop="date_planned_finished"
|
||||
string="Manufacturing Orders" event_limit="5" quick_add="False">
|
||||
<calendar date_start="date_start" date_stop="date_finished"
|
||||
string="Manufacturing Orders" event_limit="5" quick_create="0">
|
||||
<field name="user_id" avatar_field="avatar_128"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty"/>
|
||||
|
|
@ -497,7 +604,7 @@
|
|||
<field name="model">mrp.production</field>
|
||||
<field name="arch" type="xml">
|
||||
<pivot string="Manufacturing Orders" sample="1">
|
||||
<field name="date_planned_start" type="row"/>
|
||||
<field name="date_start" type="row"/>
|
||||
</pivot>
|
||||
</field>
|
||||
</record>
|
||||
|
|
@ -507,7 +614,7 @@
|
|||
<field name="model">mrp.production</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Manufacturing Orders" stacked="0" sample="1">
|
||||
<field name="date_planned_finished"/>
|
||||
<field name="date_finished"/>
|
||||
<field name="product_uom_qty" type="measure"/>
|
||||
<field name="backorder_sequence" invisible="1"/>
|
||||
<field name="qty_producing" string="Quantity Produced"/>
|
||||
|
|
@ -525,45 +632,60 @@
|
|||
<field name="product_id"/>
|
||||
<field name="product_variant_attributes"/>
|
||||
<field name="move_raw_ids" string="Component" filter_domain="[('move_raw_ids.product_id', 'ilike', self)]"/>
|
||||
<field name="name" string="Work Center" filter_domain="[('bom_id.operation_ids.workcenter_id', 'ilike', self)]"/>
|
||||
<field name="workcenter_id" string="Work Center" filter_domain="[('workorder_ids.workcenter_id', 'ilike', self)]"/>
|
||||
<field name="origin"/>
|
||||
<field name="picking_type_id"/>
|
||||
<filter string="To Do" name="todo" domain="[('state', 'in', ('draft', 'confirmed', 'progress', 'to_close'))]"
|
||||
help="Manufacturing Orders which are in confirmed state."/>
|
||||
<filter string="Starred" name="starred" domain="[('priority', '=', '1')]"/>
|
||||
<filter string="Unbuilt" name="filter_unbuilt" domain="[('unbuild_ids.state', '=', 'done')]"/>
|
||||
<separator/>
|
||||
<filter string="Draft" name="filter_draft" domain="[('state', '=', 'draft')]"/>
|
||||
<filter string="Confirmed" name="filter_confirmed" domain="[('state', '=', 'confirmed')]"/>
|
||||
<filter string="Planned" name="filter_planned" domain="[('is_planned', '=', True)]" groups="mrp.group_mrp_routings"/>
|
||||
<filter string="In Progress" name="filter_in_progress" domain="[('state', '=', 'progress')]"/>
|
||||
<filter string="To Close" name="filter_to_close" domain="[('state', '=', 'to_close')]"/>
|
||||
<filter string="Done" name="filter_done" domain="[('state', '=', 'done')]"/>
|
||||
<filter string="Cancelled" name="filter_cancel" domain="[('state', '=', 'cancel')]"/>
|
||||
<separator/>
|
||||
<filter string="Waiting" name="waiting" domain="[('reservation_state', 'in', ('waiting', 'confirmed'))]"/>
|
||||
<filter string="Ready" name="filter_ready" domain="[('reservation_state', '=', 'assigned')]"/>
|
||||
<filter string="Starred" name="starred" domain="[('priority', '=', '1')]"/>
|
||||
<separator/>
|
||||
<filter string="Planning Issues" name="planning_issues" help="Late MO or Late delivery of components"
|
||||
domain="['|', ('delay_alert_date', '!=', False), '&', ('date_deadline', '<', current_date), ('state', '=', 'confirmed')]"/>
|
||||
<filter string="Draft" name="filter_draft" domain="[('state', '=', 'draft')]"/>
|
||||
<filter string="Confirmed" name="filter_confirmed" domain="[('state', '=', 'confirmed')]"/>
|
||||
<filter string="Planned" name="filter_planned" domain="[('is_planned', '=', True)]"/>
|
||||
<filter string="In Progress" name="filter_in_progress" domain="[('state', '=', 'progress')]"/>
|
||||
<filter string="To Close" name="filter_to_close" domain="[('state', '=', 'to_close')]"/>
|
||||
<separator/>
|
||||
<filter string="MO Pending" name="waiting" domain="[('reservation_state', '=', 'waiting')]"/>
|
||||
<filter string="MO Ready" name="filter_ready" domain="[('reservation_state', '=', 'assigned')]"/>
|
||||
<separator/>
|
||||
<filter invisible="1" name="before" string="Before" domain="[('search_date_category', '=', 'before')]"/>
|
||||
<filter invisible="1" name="yesterday" string="Yesterday" domain="[('search_date_category', '=', 'yesterday')]"/>
|
||||
<filter invisible="1" name="today" string="Today" domain="[('search_date_category', '=', 'today')]"/>
|
||||
<filter invisible="1" name="day_1" string="Tomorrow" domain="[('search_date_category', '=', 'day_1')]"/>
|
||||
<filter invisible="1" name="day_2" string="The day after tomorrow" domain="[('search_date_category', '=', 'day_2')]"/>
|
||||
<filter invisible="1" name="after" string="After" domain="[('search_date_category', '=', 'after')]"/>
|
||||
<filter string="Late" name="filter_late_mo" help="Late" domain="[('date_start', '<', 'now'), ('state', '=', 'confirmed')]"/>
|
||||
<filter string="Delayed Productions" name="planning_issues" help="Late MO or Late delivery of components"
|
||||
domain="['|', ('delay_alert_date', '!=', False), ('is_delayed', '=', True)]"/>
|
||||
<filter string="Components Available" name="available" domain="[('components_availability_state', '=', 'available')]"/>
|
||||
<filter string="Late Availability" name="late" domain="[('components_availability_state', '=', 'late')]"/>
|
||||
<separator/>
|
||||
<filter string="My MOs" name="my_mos" domain="[('user_id', '=', uid)]"/>
|
||||
<separator/>
|
||||
<filter invisible="1" string="My Activities" name="filter_activities_my"
|
||||
domain="[('activity_user_id', '=', uid)]"/>
|
||||
<separator invisible="1"/>
|
||||
<filter invisible="1" string="Late Activities" name="activities_overdue"
|
||||
domain="[('my_activity_date_deadline', '<', context_today().strftime('%Y-%m-%d'))]"
|
||||
help="Show all records which has next action date is before today"/>
|
||||
domain="[('my_activity_date_deadline', '<', 'today')]"
|
||||
help="Show all records whose next activity date is past"/>
|
||||
<filter invisible="1" string="Today Activities" name="activities_today"
|
||||
domain="[('my_activity_date_deadline', '=', context_today().strftime('%Y-%m-%d'))]"/>
|
||||
domain="[('my_activity_date_deadline', '=', 'today')]"/>
|
||||
<filter invisible="1" string="Future Activities" name="activities_upcoming_all"
|
||||
domain="[('my_activity_date_deadline', '>', context_today().strftime('%Y-%m-%d'))]"/>
|
||||
<filter name="filter_date_planned_start" string="Scheduled Date" date="date_planned_start"/>
|
||||
<filter name="filter_plan_date" invisible="1" string="Scheduled Date: Last 365 Days" domain="[('date_planned_start', '>', (datetime.datetime.now() + relativedelta(days=-365)).to_utc().strftime('%Y-%m-%d %H:%M:%S'))]"/>
|
||||
domain="[('my_activity_date_deadline', '>', 'today')]"/>
|
||||
<filter name="filter_date_start" string="Date" date="date_start"/>
|
||||
<filter name="filter_plan_date" invisible="1" string="Date: Last 365 Days" domain="[('date_start', '>', '-365d')]"/>
|
||||
<separator/>
|
||||
<filter string="Warnings" name="activities_exception"
|
||||
domain="[('activity_exception_decoration', '!=', False)]"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<group>
|
||||
<filter string="Product" name="product" domain="[]" context="{'group_by': 'product_id'}"/>
|
||||
<filter string="Status" name="status" domain="[]" context="{'group_by': 'state'}"/>
|
||||
<filter string="Material Availability" name="groupby_reservation_state" domain="[]" context="{'group_by': 'reservation_state'}"/>
|
||||
<filter string="Procurement Group" name="procurement_group_id" domain="[]" context="{'group_by': 'procurement_group_id'}"/>
|
||||
<filter string="Scheduled Date" name="scheduled_date" domain="[]" context="{'group_by': 'date_planned_start'}" help="Scheduled Date by Month"/>
|
||||
<filter string="Date" name="date" domain="[]" context="{'group_by': 'date_start'}" help="Date by Month"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
|
@ -571,9 +693,9 @@
|
|||
|
||||
<record id="mrp_production_action" model="ir.actions.act_window">
|
||||
<field name="name">Manufacturing Orders</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="path">manufacturing</field>
|
||||
<field name="res_model">mrp.production</field>
|
||||
<field name="view_mode">tree,kanban,form,calendar,pivot,graph</field>
|
||||
<field name="view_mode">list,kanban,form,calendar,pivot,graph,activity</field>
|
||||
<field name="view_id" eval="False"/>
|
||||
<field name="search_view_id" ref="view_mrp_production_filter"/>
|
||||
<field name="context">{'search_default_todo': True, 'default_company_id': allowed_company_ids[0]}</field>
|
||||
|
|
@ -582,16 +704,15 @@
|
|||
<p class="o_view_nocontent_smiling_face">
|
||||
No manufacturing order found. Let's create one.
|
||||
</p><p>
|
||||
Consume <a name="%(product.product_template_action)d" type='action' tabindex="-1">components</a> and build finished products using <a name="%(mrp_bom_form_action)d" type='action' tabindex="-1">bills of materials</a>
|
||||
Use Manufacturing Orders (MO) to build finished products while consuming components: i.e. 1 Table = 4 Table Legs + 1 Table Top
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_production_action_picking_deshboard" model="ir.actions.act_window">
|
||||
<field name="name">Manufacturing Orders</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.production</field>
|
||||
<field name="view_mode">tree,kanban,form</field>
|
||||
<field name="view_mode">list,kanban,form</field>
|
||||
<field name="view_id" eval="False"/>
|
||||
<field name="search_view_id" ref="view_mrp_production_filter"/>
|
||||
<field name="domain">[('picking_type_id', '=', active_id)]</field>
|
||||
|
|
@ -602,7 +723,7 @@
|
|||
<field name="name">Unreserve</field>
|
||||
<field name="model_id" ref="mrp.model_mrp_production"/>
|
||||
<field name="binding_model_id" ref="mrp.model_mrp_production"/>
|
||||
<field name="binding_view_types">list</field>
|
||||
<field name="binding_view_types">list,kanban</field>
|
||||
<field name="state">code</field>
|
||||
<field name="code">
|
||||
if records:
|
||||
|
|
@ -615,41 +736,12 @@
|
|||
parent="menu_mrp_manufacturing"
|
||||
sequence="1"/>
|
||||
|
||||
<record id="mrp_production_report" model="ir.actions.act_window">
|
||||
<field name="name">Manufacturing Orders</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.production</field>
|
||||
<field name="view_mode">graph,pivot,form</field>
|
||||
<field name="target">current</field>
|
||||
<field name="context">{
|
||||
'search_default_product': 1,
|
||||
'search_default_scheduled_date': 2,
|
||||
'search_default_filter_confirmed': True,
|
||||
'search_default_filter_planned': True,
|
||||
'default_company_id': allowed_company_ids[0],
|
||||
'allowed_company_ids': allowed_company_ids
|
||||
}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
No data yet!
|
||||
</p><p>
|
||||
Create a new manufacturing order
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_mrp_workorder_todo"
|
||||
name="Work Orders"
|
||||
action="mrp_workorder_todo"
|
||||
parent="menu_mrp_manufacturing"
|
||||
groups="group_mrp_routings"/>
|
||||
|
||||
<menuitem id="menu_mrp_production_report"
|
||||
name="Manufacturing Orders"
|
||||
parent="menu_mrp_reporting"
|
||||
action="mrp_production_report"
|
||||
sequence="11"/>
|
||||
|
||||
<menuitem id="menu_mrp_work_order_report"
|
||||
name="Work Orders"
|
||||
parent="menu_mrp_reporting"
|
||||
|
|
@ -659,7 +751,6 @@
|
|||
|
||||
<record id="action_mrp_production_form" model="ir.actions.act_window">
|
||||
<field name="name">Manufacturing Orders</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.production</field>
|
||||
<field name="view_mode">form</field>
|
||||
</record>
|
||||
|
|
|
|||
|
|
@ -3,38 +3,35 @@
|
|||
<data>
|
||||
<!-- Routings Workcenter -->
|
||||
<record id="mrp_routing_workcenter_tree_view" model="ir.ui.view">
|
||||
<field name="name">mrp.routing.workcenter.tree</field>
|
||||
<field name="name">mrp.routing.workcenter.list</field>
|
||||
<field name="model">mrp.routing.workcenter</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Routing Work Centers" multi_edit="1">
|
||||
<field name="company_id" invisible="1"/>
|
||||
<list string="Routing Work Centers" multi_edit="1">
|
||||
<field name="active" column_invisible="True"/>
|
||||
<field name="company_id" column_invisible="True"/>
|
||||
<field name="name"/>
|
||||
<field name="bom_id"/>
|
||||
<field name="bom_id" column_invisible="context.get('bom_id_invisible', False)"/>
|
||||
<field name="workcenter_id"/>
|
||||
<field name="time_mode" optional="show"/>
|
||||
<field name="time_computed_on" optional="hide"/>
|
||||
<field name="time_cycle" widget="float_time" string="Duration (minutes)" width="1.5"/>
|
||||
<field name="time_cycle" widget="float_time" string="Duration (minutes)"/>
|
||||
<field name="time_total" widget="float_time" string="Total Duration (minutes)" optional="hide"/>
|
||||
<field name="company_id" optional="hide" groups="base.group_multi_company"/>
|
||||
<field name="possible_bom_product_template_attribute_value_ids" invisible="1"/>
|
||||
<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}" groups="product.group_product_variant"/>
|
||||
<field name="blocked_by_operation_ids" widget="many2many_tags" optional="hide" groups="mrp.group_mrp_workorder_dependencies"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_routing_workcenter_bom_tree_view" model="ir.ui.view">
|
||||
<field name="name">mrp.routing.workcenter.bom.tree</field>
|
||||
<field name="name">mrp.routing.workcenter.bom.list</field>
|
||||
<field name="model">mrp.routing.workcenter</field>
|
||||
<field name="inherit_id" ref="mrp_routing_workcenter_tree_view"/>
|
||||
<field name="priority">1000</field>
|
||||
<field name="mode">primary</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//tree" position="attributes">
|
||||
<attribute name="delete">0</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//tree" position="inside">
|
||||
<xpath expr="//list" position="inside">
|
||||
<control>
|
||||
<create string="Add a line"/>
|
||||
<button name="action_open_operation_form" class="btn-link" type="object" string="Add a line" context="{'default_bom_id': parent.id}"/>
|
||||
<button name="copy_existing_operations" class="btn-link" type="object" string="Copy Existing Operations" context="{'bom_id': parent.id}"/>
|
||||
</control>
|
||||
</xpath>
|
||||
|
|
@ -42,31 +39,28 @@
|
|||
<field name="sequence" widget="handle"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='bom_id']" position="replace"/>
|
||||
<xpath expr="//field[@name='time_cycle']" position="attributes">
|
||||
<xpath expr="//field[@name='time_total']" position="attributes">
|
||||
<attribute name="sum">Total Duration</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='bom_product_template_attribute_value_ids']" position="attributes">
|
||||
<attribute name="attrs">{'column_invisible': [('parent.product_id', '!=', False)]}</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='bom_product_template_attribute_value_ids']" position="after">
|
||||
<button name="action_archive" class="oe_right" type="object" string="Archive Operation"/>
|
||||
<attribute name="column_invisible">parent.product_id</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='blocked_by_operation_ids']" position="replace">
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='name']" position="after">
|
||||
<field name="bom_id" invisible="1"/>
|
||||
<field name="blocked_by_operation_ids" widget="many2many_tags" optional="hide" attrs="{'column_invisible': [('parent.allow_operation_dependencies', '=', False)]}"/>
|
||||
<field name="bom_id" column_invisible="True"/>
|
||||
<field name="blocked_by_operation_ids" widget="many2many_tags" optional="hide" column_invisible="not parent.allow_operation_dependencies"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_routing_workcenter_copy_to_bom_tree_view" model="ir.ui.view">
|
||||
<field name="name">mrp.routing.workcenter.copy_to_bom.tree</field>
|
||||
<field name="name">mrp.routing.workcenter.copy_to_bom.list</field>
|
||||
<field name="model">mrp.routing.workcenter</field>
|
||||
<field name="inherit_id" ref="mrp_routing_workcenter_tree_view"/>
|
||||
<field name="mode">primary</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//tree" position="attributes">
|
||||
<xpath expr="//list" position="attributes">
|
||||
<attribute name="create">0</attribute>
|
||||
<attribute name="delete">0</attribute>
|
||||
<attribute name="export_xlsx">0</attribute>
|
||||
|
|
@ -84,65 +78,97 @@
|
|||
<field name="name">mrp.routing.workcenter.form</field>
|
||||
<field name="model">mrp.routing.workcenter</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Routing Work Centers">
|
||||
<form string="Routing Work Centers" class="o_mrp_routing_form">
|
||||
<sheet>
|
||||
<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"/>
|
||||
<div class="d-flex">
|
||||
<h1 class="d-flex w-100">
|
||||
<field name="name" options="{'line_breaks': False}" widget="text" class="o_task_name text-truncate w-md-75 w-100 pe-2" placeholder="Operation..."/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group name="description">
|
||||
<field name="active" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="name"/>
|
||||
<field name="bom_id" invisible="context.get('bom_id_invisible', False)" domain="[]" readonly="context.get('default_bom_id', False)"/>
|
||||
<field name="workcenter_id" context="{'default_company_id': company_id}"/>
|
||||
<field name="workcenter_id"/>
|
||||
<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"/>
|
||||
<field name="cost_mode" widget="radio" options="{'horizontal': true}"/>
|
||||
<field name="allow_operation_dependencies" invisible="1"/>
|
||||
<field name="blocked_by_operation_ids" widget="many2many_tags" context="{'default_bom_id':bom_id}" attrs="{'invisible': [('allow_operation_dependencies', '=', False)]}"/>
|
||||
<field name="blocked_by_operation_ids" widget="many2many_tags" context="{'default_bom_id':bom_id}" invisible="not allow_operation_dependencies"/>
|
||||
</group><group name="workorder">
|
||||
<field name="workorder_count" invisible="1"/>
|
||||
<field name="time_mode" widget="radio"/>
|
||||
<label for="time_mode_batch" attrs="{'invisible': [('time_mode', '=', 'manual')]}"/>
|
||||
<div attrs="{'invisible': [('time_mode', '=', 'manual')]}">
|
||||
last
|
||||
<field name="time_mode_batch" class="oe_inline"/>
|
||||
work orders
|
||||
<field name="time_mode" widget="radio" options="{'horizontal': true}"/>
|
||||
<label for="time_cycle_manual" string="Default Duration"/>
|
||||
<div>
|
||||
<field name="time_cycle_manual" widget="float_time" class="oe_inline" invisible="time_mode == 'auto' and workorder_count != 0"/>
|
||||
<span invisible="time_mode == 'auto' and workorder_count != 0">minutes</span>
|
||||
<span invisible="time_mode == 'manual'"> / last </span>
|
||||
<field name="time_mode_batch" class="oe_inline o_small_integer" invisible="time_mode == 'manual'"/>
|
||||
<span invisible="time_mode == 'manual'">work orders</span>
|
||||
</div>
|
||||
<label for="time_cycle_manual" attrs="{'invisible': [('time_mode', '=', 'auto'), ('workorder_count', '!=' , 0)]}" string="Default Duration"/>
|
||||
<div attrs="{'invisible': [('time_mode', '=', 'auto'), ('workorder_count', '!=' , 0)]}">
|
||||
<field name="time_cycle_manual" widget="float_time" class="oe_inline"/> minutes
|
||||
<field name="cycle_number" class="oe_inline" invisible="cycle_number < 2"/>
|
||||
<field name="show_time_total" invisible="1"/>
|
||||
<label for="time_total" string="Total Duration" invisible="not show_time_total"/>
|
||||
<div invisible="not show_time_total">
|
||||
<field name="time_total" widget="float_time" class="oe_inline"/>
|
||||
<span>minutes</span>
|
||||
</div>
|
||||
<field name="time_cycle" invisible="1"/>
|
||||
<field name="company_id" groups="base.group_multi_company" />
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Work Sheet" name="worksheet">
|
||||
<group>
|
||||
<field name="worksheet_type" widget="radio"/>
|
||||
<field name="worksheet" help="Upload your PDF file." widget="pdf_viewer" attrs="{'invisible': [('worksheet_type', '!=', 'pdf')], 'required': [('worksheet_type', '=', 'pdf')]}"/>
|
||||
<field name="worksheet_google_slide" placeholder="Google Slide Link" widget="embed_viewer" attrs="{'invisible': [('worksheet_type', '!=', 'google_slide')], 'required': [('worksheet_type', '=', 'google_slide')]}"/>
|
||||
<field name="note" attrs="{'invisible': [('worksheet_type', '!=', 'text')]}"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_routing_workcenter_kanban_view" model="ir.ui.view">
|
||||
<field name="name">mrp.routing.workcenter.kanban</field>
|
||||
<field name="model">mrp.routing.workcenter</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban>
|
||||
<templates>
|
||||
<t t-name="card">
|
||||
<div class="d-flex">
|
||||
<field name="name" class="fw-bold fs-5 mb-1"/>
|
||||
</div>
|
||||
<footer class="pt-0">
|
||||
<field name="workcenter_id"/>
|
||||
</footer>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_routing_action" model="ir.actions.act_window">
|
||||
<field name="name">Operations</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.routing.workcenter</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_mode">list,kanban,form</field>
|
||||
<field name="view_id" ref="mrp_routing_workcenter_tree_view"/>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create a new operation
|
||||
</p><p>
|
||||
Operation define that need to be done to realize a Work Order.
|
||||
Each operation is done at a specific Work Center and has a specific duration.
|
||||
</p>
|
||||
<div class="o_mrp_routing_image settings 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>
|
||||
</field>
|
||||
<field name="domain">['|', ('bom_id', '=', False), ('bom_id.active', '=', True)]</field>
|
||||
</record>
|
||||
|
|
|
|||
|
|
@ -4,9 +4,8 @@
|
|||
|
||||
<record id="action_mrp_unbuild_moves" model="ir.actions.act_window">
|
||||
<field name="name">Stock Moves</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">stock.move.line</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="domain">['|', ('move_id.unbuild_id', '=', active_id), ('move_id.consume_unbuild_id', '=', active_id)]</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_empty_folder">
|
||||
|
|
@ -25,18 +24,21 @@
|
|||
<search string="Search">
|
||||
<field name="product_id"/>
|
||||
<field name="mo_id"/>
|
||||
<group expand="0" string="Filters">
|
||||
<group>
|
||||
<filter name="draft" string="Draft" domain="[('state', '=', 'draft')]"/>
|
||||
<filter name="done" string="Done" domain="[('state', '=', 'done')]"/>
|
||||
<filter invisible="1" string="My Activities" name="filter_activities_my"
|
||||
domain="[('activity_user_id', '=', uid)]"/>
|
||||
<separator invisible="1"/>
|
||||
<filter invisible="1" string="Late Activities" name="activities_overdue"
|
||||
domain="[('my_activity_date_deadline', '<', context_today().strftime('%Y-%m-%d'))]"
|
||||
help="Show all records which has next action date is before today"/>
|
||||
domain="[('my_activity_date_deadline', '<', 'today')]"
|
||||
help="Show all records whose next activity date is past"/>
|
||||
<filter invisible="1" string="Today Activities" name="activities_today"
|
||||
domain="[('my_activity_date_deadline', '=', context_today().strftime('%Y-%m-%d'))]"/>
|
||||
domain="[('my_activity_date_deadline', '=', 'today')]"/>
|
||||
<filter invisible="1" string="Future Activities" name="activities_upcoming_all"
|
||||
domain="[('my_activity_date_deadline', '>', context_today().strftime('%Y-%m-%d'))]"/>
|
||||
domain="[('my_activity_date_deadline', '>', 'today')]"/>
|
||||
</group>
|
||||
<group expand='0' string='Group by...'>
|
||||
<group>
|
||||
<filter string='Product' name="productgroup" context="{'group_by': 'product_id'}"/>
|
||||
<filter string="Manufacturing Order" name="mogroup" context="{'group_by': 'mo_id'}"/>
|
||||
</group>
|
||||
|
|
@ -49,33 +51,17 @@
|
|||
<field name="model">mrp.unbuild</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban class="o_kanban_mobile" sample="1">
|
||||
<field name="name"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom_id"/>
|
||||
<field name="state"/>
|
||||
<field name="location_id"/>
|
||||
<field name="activity_state"/>
|
||||
<progressbar field="activity_state" colors='{"planned": "success", "today": "warning", "overdue": "danger"}'/>
|
||||
<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><field name="name"/></span></strong>
|
||||
</div>
|
||||
<strong><t t-esc="record.product_qty.value"/> <small><t t-esc="record.product_uom_id.value"/></small></strong>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-8 text-muted">
|
||||
<span><t t-esc="record.product_id.value"/></span>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<span class="float-end text-end">
|
||||
<field name="state" widget="label_selection" options="{'classes': {'draft': 'default', 'done': 'success'}}" readonly="1"/>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<t t-name="card">
|
||||
<div class="d-flex fw-bold mb-1">
|
||||
<field name="name" class="fs-5"/>
|
||||
<field name="product_qty" class="ms-auto me-1 fs-6"/>
|
||||
<field name="product_uom_id" class="small" groups="uom.group_uom"/>
|
||||
</div>
|
||||
<div class="d-flex text-muted">
|
||||
<field name="product_id"/>
|
||||
<field name="state" class="ms-auto" widget="label_selection" options="{'classes': {'draft': 'default', 'done': 'success'}}" readonly="1"/>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
|
|
@ -88,45 +74,45 @@
|
|||
<field name="model">mrp.unbuild</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Unbuild Orders">
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="company_id" invisible="1" readonly="state == 'done'"/>
|
||||
<header>
|
||||
<button name="action_validate" string="Unbuild" type="object" states="draft" class="oe_highlight" data-hotkey="v"/>
|
||||
<button name="action_validate" string="Unbuild" type="object" invisible="state != 'draft'" class="oe_highlight" data-hotkey="v"/>
|
||||
<field name="state" widget="statusbar" statusbar_visible="draft,done"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button class="oe_stat_button" name="%(action_mrp_unbuild_moves)d"
|
||||
string="Product Moves" type="action" icon="fa-exchange" states="done"/>
|
||||
type="action" icon="fa-exchange" invisible="state != 'done'">
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_text">Product Moves</span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<h1><field name="name" placeholder="Unbuild Order" nolabel="1"/></h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="product_id" attrs="{'readonly':['|', ('mo_id','!=',False), ('state', '=', 'done')]}" force_save="1"/>
|
||||
<field name="product_id" readonly="mo_id or state == 'done'" force_save="1"/>
|
||||
<field name="mo_bom_id" invisible="1"/>
|
||||
<field name="bom_id" attrs="{'required': [('mo_id', '=', False)], 'readonly':['|', ('mo_id','!=',False), ('state', '=', 'done')], 'invisible': [('mo_id', '!=', False), ('mo_bom_id', '=', False)]}" force_save="1"/>
|
||||
<field name="bom_id" invisible="mo_id and not mo_bom_id" readonly="mo_id or state == 'done'" required="not mo_id" force_save="1"/>
|
||||
<label for="product_qty"/>
|
||||
<div class="o_row">
|
||||
<field name="product_qty" attrs="{'readonly': ['|', ('has_tracking', '=', 'serial'), ('state', '=', 'done')]}"/>
|
||||
<field name="product_uom_id" options="{'no_open': True, 'no_create': True}" groups="uom.group_uom" attrs="{'readonly': ['|', ('mo_id', '!=', False), ('state', '=', 'done')]}" force_save="1"/>
|
||||
<field name="product_qty" readonly="has_tracking == 'serial' or state == 'done'"/>
|
||||
<field name="product_uom_id" options="{'no_open': True, 'no_create': True}" groups="uom.group_uom" widget="many2one_uom" readonly="mo_id or state == 'done'" force_save="1"/>
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
<field name="mo_id"/>
|
||||
<field name="location_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="location_dest_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="mo_id" readonly="state == 'done'"/>
|
||||
<field name="location_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations" readonly="state == 'done'"/>
|
||||
<field name="location_dest_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations" readonly="state == 'done'"/>
|
||||
<field name="has_tracking" invisible="1"/>
|
||||
<field name="lot_id" attrs="{'invisible': [('has_tracking', '=', 'none')], 'required': [('has_tracking', '!=', 'none')], 'readonly':['|', ('mo_id','!=',False), ('state', '=', 'done')]}" groups="stock.group_production_lot" force_save="1"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="lot_id" invisible="has_tracking == 'none'" readonly="state == 'done'" required="has_tracking != 'none'" groups="stock.group_production_lot" force_save="1"/>
|
||||
<field name="company_id" groups="base.group_multi_company" readonly="state == 'done'"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids"/>
|
||||
<field name="activity_ids"/>
|
||||
<field name="message_ids"/>
|
||||
</div>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
@ -141,29 +127,29 @@
|
|||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="company_id" invisible="1" readonly="state == 'done'"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="product_id" invisible="1"/>
|
||||
<field name="bom_id" invisible="1"/>
|
||||
<field name="product_id" invisible="1" readonly="state == 'done'"/>
|
||||
<field name="bom_id" invisible="1" readonly="state == 'done'"/>
|
||||
<label for="product_qty"/>
|
||||
<div class="o_row">
|
||||
<field name="product_qty" attrs="{'readonly': [('has_tracking', '=', 'serial')]}"/>
|
||||
<field name="product_uom_id" options="{'no_open': True, 'no_create': True}" groups="uom.group_uom" attrs="{'readonly': [('mo_id', '!=', False)]}" force_save="1"/>
|
||||
<field name="product_qty" readonly="has_tracking == 'serial'"/>
|
||||
<field name="product_uom_id" options="{'no_open': True, 'no_create': True}" groups="uom.group_uom" widget="many2one_uom" readonly="mo_id" force_save="1"/>
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
<field name="mo_id" invisible="1"/>
|
||||
<field name="location_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="location_dest_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="mo_id" invisible="1" readonly="state == 'done'"/>
|
||||
<field name="location_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations" readonly="state == 'done'"/>
|
||||
<field name="location_dest_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations" readonly="state == 'done'"/>
|
||||
<field name="has_tracking" invisible="1"/>
|
||||
<field name="lot_id" readonly="1" attrs="{'invisible': [('has_tracking', '=', 'none')], 'required': [('has_tracking', '!=', 'none')]}" groups="stock.group_production_lot"/>
|
||||
<field name="lot_id" invisible="has_tracking == 'none'" required="has_tracking != 'none'" groups="stock.group_production_lot"/>
|
||||
<field name="company_id" groups="base.group_multi_company" readonly="1"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
<footer class="oe_edit_only">
|
||||
<button name="action_validate" string="Unbuild" type="object" states="draft" class="oe_highlight" data-hotkey="q"/>
|
||||
<button string="Discard" special="cancel" data-hotkey="z"/>
|
||||
<button name="action_validate" string="Unbuild" type="object" invisible="state != 'draft'" class="oe_highlight" data-hotkey="q"/>
|
||||
<button string="Discard" special="cancel" data-hotkey="x"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
|
|
@ -171,30 +157,30 @@
|
|||
|
||||
|
||||
<record id="mrp_unbuild_tree_view" model="ir.ui.view">
|
||||
<field name="name">mrp.unbuild.tree</field>
|
||||
<field name="name">mrp.unbuild.list</field>
|
||||
<field name="model">mrp.unbuild</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree sample="1">
|
||||
<list sample="1">
|
||||
<field name="name" decoration-bf="1"/>
|
||||
<field name="product_id"/>
|
||||
<field name="bom_id"/>
|
||||
<field name="mo_id"/>
|
||||
<field name="product_id" readonly="state == 'done'"/>
|
||||
<field name="bom_id" readonly="state == 'done'"/>
|
||||
<field name="mo_id" readonly="state == 'done'"/>
|
||||
<field name="lot_id" groups="stock.group_production_lot"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom_id" groups="uom.group_uom"/>
|
||||
<field name="location_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="product_qty" readonly="state == 'done'"/>
|
||||
<field name="product_uom_id" groups="uom.group_uom" widget="many2one_uom" readonly="state == 'done'"/>
|
||||
<field name="location_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations" readonly="state == 'done'"/>
|
||||
<field name="activity_exception_decoration" widget="activity_exception"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="company_id" groups="base.group_multi_company" readonly="state == 'done'"/>
|
||||
<field name="state" widget='badge' decoration-success="state == 'done'" decoration-info="state == 'draft'"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="mrp_unbuild">
|
||||
<field name="name">Unbuild Orders</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.unbuild</field>
|
||||
<field name="view_mode">tree,kanban,form</field>
|
||||
<field name="path">unbuild-orders</field>
|
||||
<field name="view_mode">list,kanban,form,activity</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
No unbuild order found
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<menuitem id="menu_mrp_root"
|
||||
name="Manufacturing"
|
||||
groups="group_mrp_user,group_mrp_manager"
|
||||
web_icon="mrp,static/description/icon.svg"
|
||||
web_icon="mrp,static/description/icon.png"
|
||||
sequence="145">
|
||||
|
||||
<menuitem id="menu_mrp_manufacturing"
|
||||
|
|
|
|||
|
|
@ -1,19 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="act_product_mrp_production_workcenter" model="ir.actions.act_window">
|
||||
<field name="context">{'search_default_confirmed': 1}</field>
|
||||
<field name="name">Manufacturing Orders</field>
|
||||
<field name="res_model">mrp.production</field>
|
||||
<field name="view_mode">tree,kanban,form</field>
|
||||
<field name="domain">[('bom_id', '!=', False), ('bom_id.operation_ids.workcenter_id', '=', active_id)]</field>
|
||||
</record>
|
||||
|
||||
<record id="action_work_orders" model="ir.actions.act_window">
|
||||
<field name="name">Work Orders</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.workorder</field>
|
||||
<field name="view_mode">tree,form,gantt,pivot,graph,calendar</field>
|
||||
<field name="view_mode">list,form,pivot,graph,calendar</field>
|
||||
<field name="search_view_id" ref="view_mrp_production_work_order_search"/>
|
||||
<field name="domain">[('state', 'not in', ('done', 'cancel'))]</field>
|
||||
<field name="context">{'search_default_workcenter_id': active_id}</field>
|
||||
|
|
@ -29,11 +20,11 @@
|
|||
|
||||
<!-- Work Centers -->
|
||||
<record id="mrp_workcenter_tree_view" model="ir.ui.view">
|
||||
<field name="name">mrp.workcenter.tree</field>
|
||||
<field name="name">mrp.workcenter.list</field>
|
||||
<field name="model">mrp.workcenter</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Work Center" multi_edit="1">
|
||||
<field name="company_id" invisible="1"/>
|
||||
<list string="Work Center" multi_edit="1">
|
||||
<field name="company_id" column_invisible="True"/>
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name" optional="show"/>
|
||||
<field name="code" optional="show"/>
|
||||
|
|
@ -41,14 +32,13 @@
|
|||
<field name="alternative_workcenter_ids" widget="many2many_tags" optional="show"/>
|
||||
<field name="productive_time" optional="hide"/>
|
||||
<field name="costs_hour" optional="show"/>
|
||||
<field name="default_capacity" optional="show"/>
|
||||
<field name="time_efficiency" optional="show"/>
|
||||
<field name="oee_target" optional="show"/>
|
||||
<field name="time_start" optional="hide"/>
|
||||
<field name="time_stop" optional="hide"/>
|
||||
<field name="company_id" groups="base.group_multi_company" optional="hide"/>
|
||||
<field name="active" invisible="1"/>
|
||||
</tree>
|
||||
<field name="active" column_invisible="True"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
@ -58,17 +48,9 @@
|
|||
<field name="arch" type="xml">
|
||||
<kanban class="o_kanban_mobile">
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div t-attf-class="oe_kanban_content oe_kanban_global_click">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<strong><field name="name"/></strong>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<span>Code <field name="code"/></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<t t-name="card">
|
||||
<field name="name" class="fw-bolder"/>
|
||||
<field t-if="record.code.raw_value" name="code"/>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
|
|
@ -88,10 +70,9 @@
|
|||
</record>
|
||||
<record model="ir.actions.act_window" id="mrp_workcenter_productivity_report_oee">
|
||||
<field name="name">Overall Equipment Effectiveness</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.workcenter.productivity</field>
|
||||
<field name="view_id" eval="oee_pie_view"/>
|
||||
<field name="view_mode">graph,pivot,tree,form</field>
|
||||
<field name="view_id" ref="oee_pie_view"/>
|
||||
<field name="view_mode">graph,pivot,list,form</field>
|
||||
<field name="domain">[('workcenter_id','=',active_id)]</field>
|
||||
<field name="context">{'search_default_thismonth':True}</field>
|
||||
<field name="help" type="html">
|
||||
|
|
@ -102,9 +83,8 @@
|
|||
</record>
|
||||
<record model="ir.actions.act_window" id="mrp_workcenter_productivity_report_blocked">
|
||||
<field name="name">Productivity Losses</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.workcenter.productivity</field>
|
||||
<field name="view_mode">tree,form,graph,pivot</field>
|
||||
<field name="view_mode">list,form,graph,pivot</field>
|
||||
<field name="context">{'search_default_availability': '1',
|
||||
'search_default_performance': '1',
|
||||
'search_default_quality': '1',
|
||||
|
|
@ -119,10 +99,9 @@
|
|||
|
||||
<record model="ir.actions.act_window" id="mrp_workorder_workcenter_report">
|
||||
<field name="name">Work Orders Performance</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.workorder</field>
|
||||
<field name="domain">[('workcenter_id','=', active_id),('state','=','done')]</field>
|
||||
<field name="view_mode">graph,pivot,tree,form,gantt</field>
|
||||
<field name="view_mode">graph,pivot,list,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create a new work orders performance
|
||||
|
|
@ -131,16 +110,15 @@
|
|||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="mrp_workorder_report">
|
||||
<field name="name">Work Orders</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="name">Work Orders Analysis</field>
|
||||
<field name="res_model">mrp.workorder</field>
|
||||
<field name="path">work-orders-analysis</field>
|
||||
<field name="domain">[]</field>
|
||||
<field name="context">{'search_default_workcenter': 1,
|
||||
'search_default_ready': True,
|
||||
'search_default_waiting': True,
|
||||
'search_default_pending': True,
|
||||
'search_default_blocked': True,
|
||||
'search_default_progress': True,}</field>
|
||||
<field name="view_mode">graph,pivot,tree,form,gantt</field>
|
||||
<field name="view_mode">graph,pivot,list,form</field>
|
||||
<field name="search_view_id" ref="view_mrp_production_work_order_search"/>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
|
|
@ -154,142 +132,113 @@
|
|||
<field name="name">mrp.workcenter.kanban</field>
|
||||
<field name="model">mrp.workcenter</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban class="oe_background_grey o_kanban_dashboard o_workcenter_kanban" create="0" sample="1">
|
||||
<field name="name"/>
|
||||
<field name="color"/>
|
||||
<kanban highlight_color="color" class="o_workcenter_kanban" create="0" can_open="0" sample="0">
|
||||
<field name="workorder_count"/>
|
||||
<field name="working_state"/>
|
||||
<field name="oee_target"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div t-attf-class="#{!selection_mode ? kanban_color(record.color.raw_value) : ''}">
|
||||
<div t-attf-class="o_kanban_card_header o_kanban_record_top">
|
||||
<div class="o_kanban_record_headings o_kanban_card_header_title">
|
||||
<span class="o_primary ml8" style="display: inline-block">
|
||||
<field name="name"/>
|
||||
</span>
|
||||
<t t-name="menu">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<h5 role="menuitem" class="o_kanban_card_manage_title">
|
||||
<span>Actions</span>
|
||||
</h5>
|
||||
<div role="menuitem" name="plan_order">
|
||||
<a name="action_work_order" type="object">Plan Orders</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="o_kanban_manage_button_section">
|
||||
<a class="o_kanban_manage_toggle_button" href="#"><i class="fa fa-ellipsis-v" role="img" aria-label="Manage" title="Manage"/></a>
|
||||
<div class="col-6">
|
||||
<h5 role="menuitem" class="o_kanban_card_manage_title">
|
||||
<span>Reporting</span>
|
||||
</h5>
|
||||
<div role="menuitem">
|
||||
<a name="%(mrp_workcenter_productivity_report_oee)d" type="action">OEE</a>
|
||||
</div>
|
||||
<div role="menuitem">
|
||||
<a name="%(mrp_workorder_workcenter_report)d" type="action" context="{'search_default_thisyear':True}">
|
||||
Performance
|
||||
</a>
|
||||
</div>
|
||||
<div role="menuitem">
|
||||
<a name="action_work_order" type="object" context="{'search_default_waiting': 1}">Waiting Availability</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container o_kanban_card_content">
|
||||
<div class="row mb16">
|
||||
<div class="col-6 o_kanban_primary_left">
|
||||
<div class="btn-group" name="o_wo">
|
||||
<t t-if="record.workorder_count.raw_value > 0">
|
||||
<button class="btn btn-primary" name="action_work_order" type="object" context="{'search_default_ready': 1, 'search_default_progress': 1}">
|
||||
<span>WORK ORDERS</span>
|
||||
</button>
|
||||
</t>
|
||||
<t t-if="record.workorder_count.raw_value <= 0">
|
||||
<button class="btn btn-warning" name="%(act_product_mrp_production_workcenter)d" type="action">
|
||||
<span>PLAN ORDERS</span>
|
||||
</button>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 o_kanban_primary_right">
|
||||
<div class="row" t-if="record.workorder_ready_count.raw_value > 0">
|
||||
<div class="col-8">
|
||||
<a name="action_work_order" type="object" context="{'search_default_ready': 1}">
|
||||
To Launch
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-4 text-end">
|
||||
<field name="workorder_ready_count"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" t-if="record.workorder_progress_count.raw_value > 0">
|
||||
<div class="col-8">
|
||||
<a name="action_work_order" type="object" context="{'search_default_progress': 1}">
|
||||
In Progress
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-4 text-end">
|
||||
<field name="workorder_progress_count"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" t-if="record.workorder_late_count.raw_value > 0">
|
||||
<div class="col-8">
|
||||
<a name="action_work_order" type="object" context="{'search_default_late': 1}">
|
||||
Late
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-4 text-end">
|
||||
<field name="workorder_late_count"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" t-if="record.oee.raw_value > 0">
|
||||
<div class="col-6">
|
||||
<a name="%(mrp_workcenter_productivity_report_oee)d" type="action">
|
||||
OEE
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-6 text-end">
|
||||
<span t-att-class="record.oee_target.raw_value and (record.oee.raw_value < record.oee_target.raw_value) and 'text-danger' or (record.oee.raw_value > record.oee_target.raw_value) and 'text-success' or 'text-warning'">
|
||||
<strong>
|
||||
<field name="oee" widget="integer"/>%
|
||||
</strong>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12 o_kanban_primary_left" style="position:absolute; bottom:10px;" name="wc_stages">
|
||||
<a name="%(act_mrp_block_workcenter)d" type="action" class="o_status float-end"
|
||||
title="No workorder currently in progress. Click to mark work center as blocked."
|
||||
aria-label="No workorder currently in progress. Click to mark work center as blocked."
|
||||
attrs="{'invisible': [('working_state','in',('blocked','done'))]}"/>
|
||||
<a name="unblock" type="object" class=" o_status o_status_red float-end"
|
||||
title="Workcenter blocked, click to unblock."
|
||||
aria-label="Workcenter blocked, click to unblock."
|
||||
attrs="{'invisible': [('working_state','in',('normal','done'))]}"/>
|
||||
<a name="%(act_mrp_block_workcenter)d" type="action" class="o_status o_status_green float-end"
|
||||
title="Work orders in progress. Click to block work center."
|
||||
aria-label="Work orders in progress. Click to block work center."
|
||||
attrs="{'invisible': [('working_state','in',('normal','blocked'))]}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div><div class="container o_kanban_card_manage_pane dropdown-menu" role="menu">
|
||||
<div class="row">
|
||||
<div class="col-6 o_kanban_card_manage_section o_kanban_manage_view">
|
||||
<div role="menuitem" class="o_kanban_card_manage_title">
|
||||
<span>Actions</span>
|
||||
</div>
|
||||
<div role="menuitem" name="plan_order">
|
||||
<a name="action_work_order" type="object">Plan Orders</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 o_kanban_card_manage_section o_kanban_manage_new">
|
||||
<div role="menuitem" class="o_kanban_card_manage_title">
|
||||
<span>Reporting</span>
|
||||
</div>
|
||||
<div role="menuitem">
|
||||
<a name="%(mrp_workcenter_productivity_report_oee)d" type="action">OEE</a>
|
||||
</div>
|
||||
<div role="menuitem">
|
||||
<a name="%(mrp_workorder_workcenter_report)d" type="action" context="{'search_default_thisyear':True}">
|
||||
Performance
|
||||
</a>
|
||||
</div>
|
||||
<div role="menuitem">
|
||||
<a name="action_work_order" type="object" context="{'search_default_waiting': 1}">Waiting Availability</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div t-if="widget.editable" class="o_kanban_card_manage_settings row">
|
||||
<div role="menuitem" aria-haspopup="true" class="col-8">
|
||||
<ul role="menu" class="oe_kanban_colorpicker" data-field="color"/>
|
||||
</div>
|
||||
<div role="menuitem" class="col-4">
|
||||
<a type="edit">Settings</a>
|
||||
<div t-if="widget.editable" class="o_kanban_card_manage_settings row">
|
||||
<div role="menuitem" aria-haspopup="true" class="col-8">
|
||||
<field name="color" widget="kanban_color_picker"/>
|
||||
</div>
|
||||
<div role="menuitem" class="col-4">
|
||||
<a type="open">Settings</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
<t t-name="card">
|
||||
<div class="ms-1">
|
||||
<div style="display: inline-block" name="wc_stages">
|
||||
<a name="%(act_mrp_block_workcenter)d" type="action" class="o_status float-end"
|
||||
title="No workorder currently in progress. Click to mark work center as blocked."
|
||||
aria-label="No workorder currently in progress. Click to mark work center as blocked."
|
||||
invisible="working_state in ('blocked', 'done')"/>
|
||||
<a name="unblock" type="object" class=" o_status o_status_red float-end"
|
||||
title="Workcenter blocked, click to unblock."
|
||||
aria-label="Workcenter blocked, click to unblock."
|
||||
invisible="working_state in ('normal', 'done')"/>
|
||||
<a name="%(act_mrp_block_workcenter)d" type="action" class="o_status o_status_green float-end"
|
||||
title="Work orders in progress. Click to block work center."
|
||||
aria-label="Work orders in progress. Click to block work center."
|
||||
invisible="working_state in ('normal', 'blocked')"/>
|
||||
</div>
|
||||
<field name="name" class="fw-bold fs-4 ms-2"/>
|
||||
</div>
|
||||
<div class="row mt-3 pb-3">
|
||||
<div class="col-6">
|
||||
<div class="btn-group p-1" name="o_wo">
|
||||
<button t-if="record.workorder_count.raw_value > 0" class="btn btn-primary" name="action_work_order" type="object" context="{'search_default_ready': 1, 'search_default_progress': 1, 'desktop_list_view': 1, 'search_default_workcenter_id': id}">
|
||||
<span>WORK ORDERS</span>
|
||||
</button>
|
||||
<button t-if="record.workorder_count.raw_value <= 0" class="btn btn-warning" name="action_work_order_alternatives" type="object">
|
||||
<span>PLAN ORDERS</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="row" t-if="record.workorder_ready_count.raw_value > 0">
|
||||
<a name="action_work_order" class="col-8" type="object" context="{'search_default_ready': 1, 'desktop_list_view': 1}">
|
||||
To Launch
|
||||
</a>
|
||||
<field name="workorder_ready_count" class="col-4 text-end"/>
|
||||
</div>
|
||||
<div class="row" t-if="record.workorder_progress_count.raw_value > 0">
|
||||
<a name="action_work_order" class="col-8" type="object" context="{'search_default_progress': 1, 'desktop_list_view': 1}">
|
||||
In Progress
|
||||
</a>
|
||||
<field name="workorder_progress_count" class="col-4 text-end"/>
|
||||
</div>
|
||||
<div class="row" t-if="record.workorder_late_count.raw_value > 0">
|
||||
<a name="action_work_order" class="col-8" type="object" context="{'search_default_late': 1, 'desktop_list_view': 1}">
|
||||
Late
|
||||
</a>
|
||||
<field name="workorder_late_count" class="col-4 text-end"/>
|
||||
</div>
|
||||
<div class="row" t-if="record.oee.raw_value > 0">
|
||||
<a name="%(mrp_workcenter_productivity_report_oee)d" class="col-6" type="action">
|
||||
OEE
|
||||
</a>
|
||||
<div class="col-6">
|
||||
<span t-att-class="record.oee_target.raw_value and (record.oee.raw_value < record.oee_target.raw_value) and 'text-danger d-flex float-end fw-bolder' or (record.oee.raw_value > record.oee_target.raw_value) and 'text-success d-flex float-end fw-bolder' or 'text-warning d-flex float-end fw-bolder'">
|
||||
<field name="oee" digits="[42, 0]"/>%
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-auto">
|
||||
<field name="kanban_dashboard_graph" graph_type="bar" widget="workcenter_dashboard_graph"/>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
|
|
@ -303,21 +252,25 @@
|
|||
<form string="Work Center">
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<field name="routing_line_ids" invisible="1"/>
|
||||
<button string="Operations" type="object"
|
||||
<field name="has_routing_lines" invisible="1"/>
|
||||
<button type="object"
|
||||
name="action_show_operations"
|
||||
attrs="{'invisible': [('routing_line_ids', '=', [])]}"
|
||||
context="{'default_workcenter_id': active_id}"
|
||||
class="oe_stat_button" icon="fa-cog"/>
|
||||
invisible="not has_routing_lines"
|
||||
context="{'default_workcenter_id': id}"
|
||||
class="oe_stat_button" icon="fa-cog">
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_text">Operations</span>
|
||||
</div>
|
||||
</button>
|
||||
<button name="%(mrp_workcenter_productivity_report_oee)d" type="action" class="oe_stat_button" icon="fa-pie-chart">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="oee" widget="statinfo" nolabel="1"/>%</span>
|
||||
<span class="o_stat_value"><field name="oee" nolabel="1"/>%</span>
|
||||
<span class="o_stat_text">OEE</span>
|
||||
</div>
|
||||
</button>
|
||||
<button name="%(mrp_workcenter_productivity_report_blocked)d" type="action" class="oe_stat_button" icon="fa-bar-chart">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="blocked_time" widget="statinfo" nolabel="1"/> Hours</span>
|
||||
<span class="o_stat_value"><field name="blocked_time" nolabel="1"/> Hours</span>
|
||||
<span class="o_stat_text">Lost</span>
|
||||
</div>
|
||||
</button>
|
||||
|
|
@ -328,18 +281,18 @@
|
|||
'search_default_pending': True,
|
||||
'search_default_progress': True}">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="workcenter_load" widget="statinfo" nolabel="1"/> Minutes</span>
|
||||
<span class="o_stat_value"><field name="workcenter_load" nolabel="1"/> Minutes</span>
|
||||
<span class="o_stat_text">Load</span>
|
||||
</div>
|
||||
</button>
|
||||
<button name="%(mrp_workorder_report)d" type="action" class="oe_stat_button" icon="fa-bar-chart" context="{'search_default_workcenter_id': id, 'search_default_thisyear': True}">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="performance" widget="statinfo" nolabel="1"/>%</span>
|
||||
<span class="o_stat_value"><field name="performance" nolabel="1"/>%</span>
|
||||
<span class="o_stat_text">Performance</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"/>
|
||||
|
|
@ -354,7 +307,7 @@
|
|||
<group>
|
||||
<field name="code"/>
|
||||
<field name="resource_calendar_id" required="1"/>
|
||||
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
||||
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}" placeholder="Visible to all"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
|
|
@ -365,19 +318,10 @@
|
|||
<div class="o_row">
|
||||
<field name="time_efficiency"/> %
|
||||
</div>
|
||||
<field name="default_capacity"/>
|
||||
<label for="oee_target"/>
|
||||
<div class="o_row">
|
||||
<field name="oee_target"/> %
|
||||
</div>
|
||||
</group>
|
||||
<group string="Costing Information" name="costing">
|
||||
<label for="costs_hour"/>
|
||||
<div id="costs_hour">
|
||||
<field name="costs_hour" widget="monetary" class="oe_inline"/> per workcenter
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
<label for="time_start"/>
|
||||
<div>
|
||||
<field name="time_start" widget="float_time" class="oe_inline"/> minutes
|
||||
|
|
@ -387,23 +331,30 @@
|
|||
<field name="time_stop" widget="float_time" class="oe_inline"/> minutes
|
||||
</div>
|
||||
</group>
|
||||
<group string="Costing Information" name="costing">
|
||||
<label for="costs_hour"/>
|
||||
<div id="costs_hour">
|
||||
<field name="costs_hour" widget="monetary" class="oe_inline"/> per workcenter
|
||||
</div>
|
||||
</group>
|
||||
</group>
|
||||
<separator string="Description"/>
|
||||
<field name="note" nolabel="1" placeholder="Description of the work center..."/>
|
||||
</page>
|
||||
<page string="Specific Capacities" name="capacity">
|
||||
<page string="Product Capacities" name="capacity">
|
||||
<field name="capacity_ids" context="{'default_workcenter_id': id}">
|
||||
<tree editable="bottom">
|
||||
<field name="product_id"/>
|
||||
<field name="product_uom_id" groups="uom.group_uom"/>
|
||||
<list editable="bottom">
|
||||
<field name="product_id" widget="stock.forced_placeholder" placeholder="All Products" decoration-it="not product_id"/>
|
||||
<field name="capacity"/>
|
||||
<field name="time_start" optional="hide"/>
|
||||
<field name="time_stop" optional="hide"/>
|
||||
</tree>
|
||||
<field name="product_uom_id" groups="uom.group_uom" widget="many2one_uom" readonly="product_id != False"/>
|
||||
<field name="time_start" widget="float_time"/>
|
||||
<field name="time_stop" widget="float_time"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
@ -415,7 +366,7 @@
|
|||
<search string="Search for mrp workcenter">
|
||||
<field name="name" string="Work Center" filter_domain="['|', ('name', 'ilike', self), ('code', 'ilike', self)]"/>
|
||||
<filter name="archived" string="Archived" domain="[('active', '=', False)]"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<group>
|
||||
<filter string="Company" name="company" domain="[]" context="{'group_by': 'company_id'}" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
</search>
|
||||
|
|
@ -424,12 +375,12 @@
|
|||
|
||||
<record id="mrp_workcenter_action" model="ir.actions.act_window">
|
||||
<field name="name">Work Centers</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="path">workcenters</field>
|
||||
<field name="res_model">mrp.workcenter</field>
|
||||
<field name="view_mode">tree,kanban,form</field>
|
||||
<field name="view_mode">list,kanban,form</field>
|
||||
<field name="view_id" ref="mrp_workcenter_tree_view"/>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('mrp_workcenter_tree_view')}),
|
||||
(0, 0, {'view_mode': 'list', 'view_id': ref('mrp_workcenter_tree_view')}),
|
||||
(0, 0, {'view_mode': 'kanban', 'view_id': ref('mrp_workcenter_view_kanban')}),
|
||||
(0, 0, {'view_mode': 'form', 'view_id': ref('mrp_workcenter_view')})]"/>
|
||||
<field name="search_view_id" ref="view_mrp_workcenter_search"/>
|
||||
|
|
@ -445,7 +396,7 @@
|
|||
|
||||
<record id="mrp_workcenter_kanban_action" model="ir.actions.act_window">
|
||||
<field name="name">Work Centers Overview</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="path">work-centers</field>
|
||||
<field name="res_model">mrp.workcenter</field>
|
||||
<field name="view_mode">kanban,form</field>
|
||||
<field name="view_id" ref="mrp_workcenter_kanban"/>
|
||||
|
|
@ -483,14 +434,14 @@
|
|||
</record>
|
||||
|
||||
<record id="oee_loss_tree_view" model="ir.ui.view">
|
||||
<field name="name">mrp.workcenter.productivity.loss.tree</field>
|
||||
<field name="name">mrp.workcenter.productivity.loss.list</field>
|
||||
<field name="model">mrp.workcenter.productivity.loss</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Workcenter Productivity Loss" editable='bottom'>
|
||||
<list string="Workcenter Productivity Loss" editable='bottom'>
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="loss_type" string="Category"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
@ -499,23 +450,17 @@
|
|||
<field name="model">mrp.workcenter.productivity.loss</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban>
|
||||
<field name="name"/>
|
||||
<field name="manual"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div t-attf-class="oe_kanban_global_click">
|
||||
<div>
|
||||
<strong>Reason: </strong><field name="name"/>
|
||||
</div>
|
||||
<div>
|
||||
<strong>Effectiveness Category: </strong><field name="loss_type"/>
|
||||
</div>
|
||||
<div>
|
||||
<strong>Is a Blocking Reason? </strong>
|
||||
<span class="float-end" title="Is a Blocking Reason?">
|
||||
<field name="manual" widget="boolean"/>
|
||||
</span>
|
||||
</div>
|
||||
<t t-name="card">
|
||||
<div>
|
||||
<strong>Reason: </strong><field name="name"/>
|
||||
</div>
|
||||
<div>
|
||||
<strong>Effectiveness Category: </strong><field name="loss_type"/>
|
||||
</div>
|
||||
<div class="d-flex">
|
||||
<strong>Is a Blocking Reason? </strong>
|
||||
<field name="manual" class="ms-auto" widget="boolean"/>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
|
|
@ -547,7 +492,7 @@
|
|||
<filter name="productive" string="Fully Productive" domain="[('loss_type','=','productive')]"/>
|
||||
<filter name="filter_date_start" string="Date" date="date_start"/>
|
||||
<separator/>
|
||||
<group expand='0' string='Group by...'>
|
||||
<group>
|
||||
<filter string="User" name="user" context="{'group_by': 'create_uid'}"/>
|
||||
<filter string='Workcenter' name="workcenter_group" context="{'group_by': 'workcenter_id'}"/>
|
||||
<filter string="Loss Reason" name="loss_group" context="{'group_by': 'loss_id'}"/>
|
||||
|
|
@ -582,10 +527,10 @@
|
|||
</record>
|
||||
|
||||
<record id="oee_tree_view" model="ir.ui.view">
|
||||
<field name="name">mrp.workcenter.productivity.tree</field>
|
||||
<field name="name">mrp.workcenter.productivity.list</field>
|
||||
<field name="model">mrp.workcenter.productivity</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Workcenter Productivity">
|
||||
<list string="Workcenter Productivity">
|
||||
<field name="date_start"/>
|
||||
<field name="date_end"/>
|
||||
<field name="workcenter_id"/>
|
||||
|
|
@ -593,7 +538,7 @@
|
|||
<field name="loss_id"/>
|
||||
<field name="duration" string="Duration (minutes)" sum="Duration"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
@ -623,9 +568,9 @@
|
|||
|
||||
<record model="ir.actions.act_window" id="mrp_workcenter_productivity_report">
|
||||
<field name="name">Overall Equipment Effectiveness</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.workcenter.productivity</field>
|
||||
<field name="view_mode">graph,pivot,tree,form</field>
|
||||
<field name="path">equipement-effectiveness</field>
|
||||
<field name="view_mode">graph,pivot,list,form</field>
|
||||
<field name="domain">[]</field>
|
||||
<field name="context">{'search_default_workcenter_group': 1, 'search_default_loss_group': 2, 'create':False,'edit':False}</field>
|
||||
<field name="help" type="html">
|
||||
|
|
|
|||
|
|
@ -8,15 +8,15 @@
|
|||
<field name="production_id"/>
|
||||
<field name="workcenter_id"/>
|
||||
<field name="product_id"/>
|
||||
<filter string="Ready" name="ready" domain="[('state','=','ready')]"/>
|
||||
<filter string="Waiting" name="waiting" domain="[('state','=','waiting')]"/>
|
||||
<filter string="Pending" name="pending" domain="[('state','=','pending')]"/>
|
||||
<field name="finished_lot_ids"/>
|
||||
<filter string="To Do" name="ready" domain="[('state','=','ready')]"/>
|
||||
<filter string="Blocked" name="blocked" domain="[('state','=','blocked')]"/>
|
||||
<filter string="In Progress" name="progress" domain="[('state','=','progress')]"/>
|
||||
<filter string="Done" name="done" domain="[('state','=', 'done')]"/>
|
||||
<filter string="Late" name="late" domain="[('date_planned_start','<=',time.strftime('%Y-%m-%d'))]"/>
|
||||
<filter string="Late" name="late" domain="[('date_start', '<=', 'today')]"/>
|
||||
<separator/>
|
||||
<filter string="Start Date" name="date_start_filter" date="date_start"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<group>
|
||||
<filter string="Work center" name="workcenter" domain="[]" context="{'group_by': 'workcenter_id'}"/>
|
||||
<filter string="Product" name="product" domain="[]" context="{'group_by': 'product_id'}"/>
|
||||
</group>
|
||||
|
|
@ -26,9 +26,8 @@
|
|||
|
||||
<record id="action_mrp_routing_time" model="ir.actions.act_window">
|
||||
<field name="name">Work Orders</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.workorder</field>
|
||||
<field name="view_mode">graph,pivot,tree,form,gantt,calendar</field>
|
||||
<field name="view_mode">graph,pivot,list,form,calendar</field>
|
||||
<field name="context">{'search_default_done': True}</field>
|
||||
<field name="search_view_id" ref="view_mrp_production_work_order_search"/>
|
||||
<field name="domain">[('operation_id.bom_id', '=', active_id), ('state', '=', 'done')]</field>
|
||||
|
|
@ -43,9 +42,8 @@
|
|||
|
||||
<record model="ir.actions.act_window" id="action_mrp_workorder_production_specific">
|
||||
<field name="name">Work Orders</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.workorder</field>
|
||||
<field name="view_mode">tree,form,gantt,calendar,pivot,graph</field>
|
||||
<field name="view_mode">list,form,calendar,pivot,graph</field>
|
||||
<field name="domain">[('production_id', '=', active_id)]</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
|
|
@ -58,72 +56,84 @@
|
|||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="mrp_production_workorder_tree_editable_view">
|
||||
<field name="name">mrp.production.work.order.tree.editable</field>
|
||||
<field name="name">mrp.production.work.order.list.editable</field>
|
||||
<field name="model">mrp.workorder</field>
|
||||
<field name="priority" eval="100"/>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="bottom" multi_edit="1">
|
||||
<field name="consumption" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="is_produced" invisible="1"/>
|
||||
<field name="is_user_working" invisible="1"/>
|
||||
<field name="product_uom_id" invisible="1" readonly="0"/>
|
||||
<field name="production_state" invisible="1"/>
|
||||
<field name="production_bom_id" invisible="1"/>
|
||||
<field name="qty_producing" invisible="1"/>
|
||||
<field name="time_ids" invisible="1"/>
|
||||
<field name="working_state" invisible="1"/>
|
||||
<field name="operation_id" invisible="1" domain="['|', ('bom_id', '=', production_bom_id), ('bom_id', '=', False)]" context="{'default_workcenter_id': workcenter_id, 'default_company_id': company_id}"/>
|
||||
<field name="name" string="Operation"/>
|
||||
<field name="workcenter_id"/>
|
||||
<list multi_edit="1">
|
||||
<field name="consumption" column_invisible="True"/>
|
||||
<field name="company_id" column_invisible="True"/>
|
||||
<field name="is_produced" column_invisible="True"/>
|
||||
<field name="is_user_working" column_invisible="True"/>
|
||||
<field name="product_uom_id" readonly="0" column_invisible="True"/>
|
||||
<field name="production_state" column_invisible="True"/>
|
||||
<field name="production_bom_id" column_invisible="True"/>
|
||||
<field name="qty_producing" column_invisible="True"/>
|
||||
<field name="time_ids" column_invisible="True"/>
|
||||
<field name="working_state" column_invisible="True"/>
|
||||
<field name="operation_id" column_invisible="True" domain="['|', ('bom_id', '=', production_bom_id), ('bom_id', '=', False)]" context="{'default_workcenter_id': workcenter_id, 'default_company_id': company_id}"/>
|
||||
<field name="name" string="Operation" readonly="state in ['cancel', 'done']"/>
|
||||
<field name="workcenter_id" readonly="state in ['cancel', 'done', 'progress']"/>
|
||||
<field name="product_id" optional="show"/>
|
||||
<field name="qty_remaining" optional="show" string="Remaining Quantity " attrs="{'column_invisible': [('parent.state', '=', 'done')]}"/>
|
||||
<field name="qty_produced" optional="show" string="Produced Quantity" attrs="{'column_invisible': [('parent.state', '!=', 'done')]}"/>
|
||||
<field name="finished_lot_id" optional="hide" string="Lot/Serial"/>
|
||||
<field name="date_planned_start" optional="show"/>
|
||||
<field name="date_planned_finished" optional="hide"/>
|
||||
<field name="date_start" optional="hide" readonly="1"/>
|
||||
<field name="date_finished" optional="hide" readonly="1"/>
|
||||
<field name="duration_expected" widget="float_time" sum="expected duration"/>
|
||||
<field name="qty_remaining" optional="show" string="Quantity"/>
|
||||
<field name="qty_ready" optional="hide" groups="base.group_no_one"/>
|
||||
<field name="finished_lot_ids" optional="hide" string="Lot/Serial"/>
|
||||
<field name="date_start" optional="hide" readonly="state in ['progress', 'done', 'cancel']"/>
|
||||
<field name="date_finished" optional="hide" readonly="state in ['progress', 'done', 'cancel']"/>
|
||||
<field name="duration_expected" widget="float_time" sum="expected duration" readonly="state in ['cancel', 'done']"/>
|
||||
<field name="duration" widget="mrp_timer"
|
||||
attrs="{'invisible': [('production_state','=', 'draft')], 'readonly': [('is_user_working', '=', True)]}" sum="real duration"/>
|
||||
<field name="state" widget="badge" decoration-warning="state == 'progress'" decoration-success="state == 'done'" decoration-danger="state == 'cancel'" decoration-info="state not in ('progress', 'done', 'cancel')"
|
||||
attrs="{'invisible': [('production_state', '=', 'draft')], 'column_invisible': [('parent.state', '=', 'draft')]}"/>
|
||||
<button name="button_start" type="object" string="Start" class="btn-success"
|
||||
attrs="{'invisible': ['|', '|', '|', ('production_state','in', ('draft', 'done', 'cancel')), ('working_state', '=', 'blocked'), ('state', 'in', ('done', 'cancel')), ('is_user_working', '!=', False)]}"/>
|
||||
<button name="button_pending" type="object" string="Pause" class="btn-warning"
|
||||
attrs="{'invisible': ['|', '|', ('production_state', 'in', ('draft', 'done', 'cancel')), ('working_state', '=', 'blocked'), ('is_user_working', '=', False)]}"/>
|
||||
<button name="button_finish" type="object" string="Done" class="btn-success"
|
||||
attrs="{'invisible': ['|', '|', ('production_state', 'in', ('draft', 'done', 'cancel')), ('working_state', '=', 'blocked'), ('is_user_working', '=', False)]}"/>
|
||||
<button name="%(mrp.act_mrp_block_workcenter_wo)d" type="action" string="Block" context="{'default_workcenter_id': workcenter_id}" class="btn-danger"
|
||||
attrs="{'invisible': ['|', ('production_state', 'in', ('draft', 'done', 'cancel')), ('working_state', '=', 'blocked')]}"/>
|
||||
<button name="button_unblock" type="object" string="Unblock" context="{'default_workcenter_id': workcenter_id}" class="btn-danger"
|
||||
attrs="{'invisible': ['|', ('production_state', 'in', ('draft', 'done', 'cancel')), ('working_state', '!=', 'blocked')]}"/>
|
||||
<button name="action_open_wizard" type="object" icon="fa-external-link" class="oe_edit_only"
|
||||
title="Open Work Order"
|
||||
context="{'default_workcenter_id': workcenter_id}"/>
|
||||
<field name="show_json_popover" invisible="1"/>
|
||||
<field name="json_popover" widget="mrp_workorder_popover" string=" " width="0.1" attrs="{'invisible': [('show_json_popover', '=', False)]}"/>
|
||||
</tree>
|
||||
invisible="production_state == 'draft'"
|
||||
readonly="is_user_working" sum="real duration"/>
|
||||
<button name="button_start" type="object" title="Start" class="btn-success px-2"
|
||||
invisible="production_state in ('draft', 'done', 'cancel') or working_state == 'blocked' or state in ('done', 'cancel') or is_user_working" icon="fa-play"/>
|
||||
<button name="button_pending" type="object" title="Pause" class="btn-warning px-2" icon="fa-pause"
|
||||
invisible="production_state in ('draft', 'done', 'cancel') or working_state == 'blocked' or not is_user_working"/>
|
||||
<button name="button_finish" type="object" title="Done" class="btn-success px-2" icon="fa-check"
|
||||
invisible="production_state in ('draft', 'done', 'cancel') or working_state == 'blocked' or not is_user_working"/>
|
||||
<widget name="mo_view_list_dropdown"/>
|
||||
<field name="state" widget="badge" decoration-info="state == 'progress'" decoration-success="state == 'done'" decoration-danger="state == 'cancel'" decoration-warning="state == 'blocked'" decoration-muted="state == 'ready'"
|
||||
column_invisible="parent and parent.state == 'draft'"
|
||||
invisible="production_state == 'draft'"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_production_workorder_tree_editable_view_mo_form" model="ir.ui.view">
|
||||
<field name="name">mrp.production.work.order.list.editable</field>
|
||||
<field name="model">mrp.workorder</field>
|
||||
<field name="mode">primary</field>
|
||||
<field name="inherit_id" ref="mrp_production_workorder_tree_editable_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//list/field[@name='qty_remaining']" position="attributes">
|
||||
<attribute name="column_invisible">parent.state == 'done'</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//list/field[@name='qty_ready']" position="attributes">
|
||||
<attribute name="column_invisible">parent.state == 'done'</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='name']" position='before'>
|
||||
<field name="sequence" widget="handle" column_invisible="parent.state != 'draft'"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_production_workorder_tree_view" model="ir.ui.view">
|
||||
<field name="name">mrp.production.work.order.tree</field>
|
||||
<field name="name">mrp.production.work.order.list</field>
|
||||
<field name="model">mrp.workorder</field>
|
||||
<field name="mode">primary</field>
|
||||
<field name="priority" eval="10"/>
|
||||
<field name="inherit_id" ref="mrp.mrp_production_workorder_tree_editable_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//tree" position="attributes">
|
||||
<xpath expr="//list" position="attributes">
|
||||
<attribute name="create">0</attribute>
|
||||
<attribute name="sample">1</attribute>
|
||||
<attribute name="editable"/>
|
||||
</xpath>
|
||||
<field name="workcenter_id" position="after">
|
||||
<field name="production_id"/>
|
||||
<field name="production_id" optional="hide"/>
|
||||
</field>
|
||||
<field name="state" position="attributes">
|
||||
<attribute name="attrs">{'invisible': [('production_state', '=', 'draft')]}</attribute>
|
||||
<attribute name="invisible">production_state == 'draft'</attribute>
|
||||
<attribute name="column_invisible">False</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
|
@ -136,71 +146,69 @@
|
|||
<field name="is_user_working" invisible="1"/>
|
||||
<field name="working_state" invisible="1"/>
|
||||
<field name="production_state" invisible="1"/>
|
||||
<field name="operation_id" invisible="1"/>
|
||||
<field name="sequence" invisible="1"/>
|
||||
<header>
|
||||
<field name="state" widget="statusbar" statusbar_visible="pending,waiting,ready,progress,done"/>
|
||||
<field name="state" widget="statusbar" statusbar_visible="blocked,ready,progress,done"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button class="oe_stat_button" name="action_see_move_scrap" type="object" icon="fa-arrows-v" attrs="{'invisible': [('scrap_count', '=', 0)]}">
|
||||
<button class="oe_stat_button" name="action_see_move_scrap" type="object" icon="oi-arrows-v" invisible="scrap_count == 0">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="scrap_count"/></span>
|
||||
<span class="o_stat_text">Scraps</span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<field name="workcenter_id" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="product_tracking" invisible="1"/>
|
||||
<field name="product_id" invisible="1"/>
|
||||
<field name="finished_lot_id" invisible="1"/>
|
||||
<field name="qty_producing" invisible="1"/>
|
||||
<field name="finished_lot_ids" invisible="1"/>
|
||||
<group>
|
||||
<group attrs="{'invisible': [('date_planned_start', '=', False)]}">
|
||||
<label for="date_planned_start" string="Planned Date"/>
|
||||
<group>
|
||||
<field name="name" readonly="state in ['cancel', 'done']" force_save="1"/>
|
||||
<field name="workcenter_id" readonly="state in ['cancel', 'done', 'progress']"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="product_id" readonly="1"/>
|
||||
<field name="qty_remaining" string="Quantity" readonly="1" invisible="state == 'done'"/>
|
||||
<field name="qty_produced" string="Produced Quantity" groups="base.group_no_one" readonly="state == 'done' or product_tracking == 'serial'"/>
|
||||
<field name="finished_lot_ids" readonly="1" widget="many2many_tags" options="{'edit_tags': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group>
|
||||
<label for="date_start" string="Start Date"/>
|
||||
<div class="oe_inline">
|
||||
<field name="is_planned" invisible="1"/>
|
||||
<field name="date_planned_start" class="mr8 oe_inline" attrs="{'required': [('is_planned', '=', True)]}"/>
|
||||
<field name="date_start" class="mr8 oe_inline" readonly="state in ['cancel', 'done']"/>
|
||||
<strong class="mr8 oe_inline">to</strong>
|
||||
<field name="date_planned_finished" class="oe_inline" attrs="{'required': [('is_planned', '=', True)]}"/>
|
||||
<field name="date_finished" class="oe_inline" readonly="state in ['cancel', 'done']"/>
|
||||
<field name="show_json_popover" invisible="1"/>
|
||||
<field name="json_popover" widget="mrp_workorder_popover" class="oe_inline mx-2" attrs="{'invisible': [('show_json_popover', '=', False)]}"/>
|
||||
<field name="json_popover" widget="mrp_workorder_popover" class="oe_inline mx-2" invisible="not show_json_popover"/>
|
||||
</div>
|
||||
<label for="duration_expected"/>
|
||||
<div class="o_row">
|
||||
<field name="duration_expected" widget="float_time"/>
|
||||
<field name="duration_expected" widget="float_time" readonly="state in ['cancel', 'done']"/>
|
||||
<span>minutes</span>
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
<field name="production_id"/>
|
||||
<field name="production_id" force_save="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Components" name="components">
|
||||
<field name="move_raw_ids" readonly="1">
|
||||
<tree>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="product_type" invisible="1"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty" string="To Consume"/>
|
||||
<field name="reserved_availability" string ="Reserved"/>
|
||||
<field name="quantity_done" string="Consumed"/>
|
||||
<field name="product_qty_available" string="On Hand" attrs="{'invisible': [('product_type', '!=', 'product')]}"/>
|
||||
<field name="product_virtual_available" string="Forecasted" attrs="{'invisible': [('product_type', '!=', 'product')]}"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Time Tracking" name="time_tracking" groups="mrp.group_mrp_manager">
|
||||
<page string="Time Tracking" name="time_tracking" groups="mrp.group_mrp_manager">
|
||||
<field name="time_ids" nolabel="1" context="{'default_workcenter_id': workcenter_id, 'default_workorder_id': id}">
|
||||
<tree editable="bottom">
|
||||
<list editable="bottom">
|
||||
<field name="user_id"/>
|
||||
<field name="duration" widget="float_time" sum="Total duration"/>
|
||||
<field name="duration" widget="float_time" readonly="id"/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_end"/>
|
||||
<field name="workcenter_id" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="workcenter_id" column_invisible="True"/>
|
||||
<field name="company_id" column_invisible="True"/>
|
||||
<field name="loss_id" string="Productivity" optional="show"/>
|
||||
</tree>
|
||||
</list>
|
||||
<form>
|
||||
<group>
|
||||
<group>
|
||||
|
|
@ -218,29 +226,42 @@
|
|||
</group>
|
||||
</form>
|
||||
</field>
|
||||
<div>
|
||||
<label for="duration" class="pe-2"/>
|
||||
<field name="duration" widget="float_time" readonly="1"/>
|
||||
<span> (minutes)</span>
|
||||
</div>
|
||||
</page>
|
||||
<page string="Work Instruction" name="workorder_page_work_instruction" attrs="{'invisible': [('worksheet', '=', False), ('worksheet_google_slide', '=', False), ('operation_note', '=', False)]}">
|
||||
<field name="worksheet_type" invisible="1"/>
|
||||
<field name="worksheet" widget="pdf_viewer" attrs="{'invisible': [('worksheet_type', '!=', 'pdf')]}"/>
|
||||
<field name="worksheet_google_slide" widget="embed_viewer" attrs="{'invisible': [('worksheet_type', '!=', 'google_slide')]}"/>
|
||||
<field name="operation_note" attrs="{'invisible': [('worksheet_type', '!=', 'text')]}"/>
|
||||
<page string="Components" name="components">
|
||||
<field name="move_raw_ids" readonly="1">
|
||||
<list>
|
||||
<field name="state" column_invisible="True"/>
|
||||
<field name="product_id" readonly="state == 'done'"/>
|
||||
<field name="product_qty" string="To Consume"/>
|
||||
<field name="quantity" string="Quantity"/>
|
||||
<field name="picked" string="Consumed"/>
|
||||
<field name="product_qty_available" string="On Hand" invisible="not is_storable"/>
|
||||
<field name="product_virtual_available" string="Forecasted" invisible="not is_storable"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<field name="allow_workorder_dependencies" invisible="1"/>
|
||||
<page string="Blocked By" name="dependencies" attrs="{'invisible': [('allow_workorder_dependencies', '=', False)]}">
|
||||
<field name="blocked_by_workorder_ids" nolabel="1">
|
||||
<tree editable="bottom">
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="name" string="Operation"/>
|
||||
<page string="Blocked By" name="dependencies" invisible="not allow_workorder_dependencies">
|
||||
<field name="blocked_by_workorder_ids" nolabel="1" readonly="1">
|
||||
<list>
|
||||
<field name="company_id" column_invisible="True"/>
|
||||
<field name="name" string="Operation" readonly="state in ['cancel', 'done']"/>
|
||||
<field name="company_id" optional="hide" groups="base.group_multi_company"/>
|
||||
<field name="workcenter_id"/>
|
||||
<field name="date_planned_start" readonly="1"/>
|
||||
<field name="date_planned_finished" readonly="1"/>
|
||||
<field name="duration_expected" widget="float_time" sum="expected duration"/>
|
||||
<field name="production_state" invisible="1"/>
|
||||
<field name="workcenter_id" readonly="state in ['cancel', 'done', 'progress']"/>
|
||||
<field name="date_start" readonly="1"/>
|
||||
<field name="date_finished" readonly="1"/>
|
||||
<field name="duration_expected" widget="float_time" sum="expected duration" readonly="state in ['cancel', 'done']"/>
|
||||
<field name="production_state" column_invisible="True"/>
|
||||
<field name="state" widget="badge" decoration-warning="state == 'progress'" decoration-success="state == 'done'" decoration-info="state not in ('progress', 'done', 'cancel')"
|
||||
attrs="{'invisible': [('production_state', '=', 'draft')], 'column_invisible': [('parent.state', '=', 'draft')]}"/>
|
||||
column_invisible="parent.state == 'draft'"
|
||||
invisible="production_state == 'draft'"/>
|
||||
<button class="oe_link float-end" string="View WorkOrder" name="action_open_wizard" type="object"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
|
|
@ -258,20 +279,22 @@
|
|||
<field name="workcenter_id"/>
|
||||
<field name="production_id"/>
|
||||
<field name="product_id"/>
|
||||
<field name="finished_lot_ids"/>
|
||||
<field name="product_variant_attributes"/>
|
||||
<field name="move_raw_ids" string="Component" filter_domain="[('move_raw_ids.product_id', 'ilike', self)]"/>
|
||||
<filter string="In Progress" name="progress" domain="[('state', '=', 'progress')]"/>
|
||||
<filter string="Ready" name="ready" domain="[('state', '=', 'ready')]"/>
|
||||
<filter string="Waiting" name="waiting" domain="[('state', '=', 'waiting')]"/>
|
||||
<filter string="Pending" name="pending" domain="[('state', '=', 'pending'), ('production_state', '!=', 'draft')]"/>
|
||||
<filter string="Draft" name="draft" domain="[('state', '=', 'pending'), ('production_state', '=', 'draft')]"/>
|
||||
<filter string="To Do" name="ready" domain="[('state', '=', 'ready')]"/>
|
||||
<filter string="Blocked" name="blocked" domain="[('state', '=', 'blocked')]"/>
|
||||
<filter string="Finished" name="finish" domain="[('state', '=', 'done')]"/>
|
||||
<filter string="Cancelled" name="cancel" domain="[('state', '=', 'cancel')]"/>
|
||||
<separator/>
|
||||
<filter string="Late" name="late" domain="['&', ('date_planned_start', '<', current_date), ('state', '=', 'ready')]"
|
||||
<filter string="Late" name="late" domain="['&', ('date_start', '<', 'now'), ('state', '=', 'ready')]"
|
||||
help="Production started late"/>
|
||||
<group expand="0" string="Group By">
|
||||
<group>
|
||||
<filter string="Work Center" name="work_center" domain="[]" context="{'group_by': 'workcenter_id'}"/>
|
||||
<filter string="Manufacturing Order" name="production" domain="[]" context="{'group_by': 'production_id'}"/>
|
||||
<filter string="Status" name="status" domain="[]" context="{'group_by': 'state'}"/>
|
||||
<filter string="Scheduled Date" name="scheduled_month" domain="[]" context="{'group_by': 'date_planned_start'}"/>
|
||||
<filter string="Date" name="scheduled_month" domain="[]" context="{'group_by': 'date_start'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
|
@ -281,7 +304,7 @@
|
|||
<field name="name">mrp.production.work.order.calendar</field>
|
||||
<field name="model">mrp.workorder</field>
|
||||
<field name="arch" type="xml">
|
||||
<calendar date_stop="date_planned_finished" date_start="date_planned_start" string="Operations" color="workcenter_id" event_limit="5" delete="0" create="0">
|
||||
<calendar date_stop="date_finished" date_start="date_start" string="Operations" color="workcenter_id" event_limit="5" delete="0" create="0">
|
||||
<field name="workcenter_id" filters="1"/>
|
||||
<field name="production_id"/>
|
||||
<field name="state"/>
|
||||
|
|
@ -316,137 +339,45 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record id="workcenter_line_gantt_production" model="ir.ui.view">
|
||||
<field name="name">mrp.production.work.order.gantt.production</field>
|
||||
<field name="model">mrp.workorder</field>
|
||||
<field name="arch" type="xml">
|
||||
<gantt class="o_mrp_workorder_gantt" date_stop="date_planned_finished" date_start="date_planned_start" string="Operations" default_group_by="production_id" create="0" delete="0"
|
||||
progress="progress" plan="0"
|
||||
decoration-danger="json_popover and 'text-danger' in json_popover"
|
||||
decoration-success="state == 'done'"
|
||||
decoration-warning="state == 'cancel' or (json_popover and 'text-warning' in json_popover)"
|
||||
color="workcenter_id"
|
||||
display_unavailability="1"
|
||||
sample="1"
|
||||
form_view_id="%(mrp_production_workorder_form_view_inherit)d">
|
||||
|
||||
<field name="date_planned_start"/>
|
||||
<field name="state"/>
|
||||
<field name="workcenter_id"/>
|
||||
<field name="json_popover"/>
|
||||
|
||||
<templates>
|
||||
<div t-name="gantt-popover" class="container-fluid">
|
||||
<div class="row g-0">
|
||||
<div class="col">
|
||||
<ul class="ps-1 mb-0 list-unstyled">
|
||||
<li><strong>Start Date: </strong> <t t-out="userTimezoneStartDate.format('L LTS')"/></li>
|
||||
<li><strong>Stop Date: </strong> <t t-out="userTimezoneStopDate.format('L LTS')"/></li>
|
||||
<li><strong>Workcenter: </strong> <t t-out="workcenter_id[1]"/></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</templates>
|
||||
</gantt>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_workorder_view_gantt" model="ir.ui.view">
|
||||
<field name="name">mrp.workorder.view.gantt</field>
|
||||
<field name="model">mrp.workorder</field>
|
||||
<field name="arch" type="xml">
|
||||
<gantt class="o_mrp_workorder_gantt" date_stop="date_planned_finished" date_start="date_planned_start" string="Operations" default_group_by="workcenter_id" create="0"
|
||||
delete="0" sample="1"
|
||||
progress="progress" plan="0"
|
||||
decoration-danger="json_popover and 'text-danger' in json_popover"
|
||||
decoration-success="state == 'done'"
|
||||
decoration-warning="state == 'cancel' or (json_popover and 'text-warning' in json_popover)"
|
||||
color="production_id"
|
||||
display_unavailability="1"
|
||||
progress_bar="workcenter_id"
|
||||
form_view_id="mrp_production_workorder_form_view_inherit">
|
||||
|
||||
<field name="date_planned_start"/>
|
||||
<field name="state"/>
|
||||
<field name="workcenter_id"/>
|
||||
<field name="json_popover"/>
|
||||
|
||||
<templates>
|
||||
<div t-name="gantt-popover" class="container-fluid">
|
||||
<div class="row g-0">
|
||||
<div class="col">
|
||||
<ul class="ps-1 mb-0 list-unstyled">
|
||||
<li><strong>Start Date: </strong> <t t-out="userTimezoneStartDate.format('L LTS')"/></li>
|
||||
<li><strong>Stop Date: </strong> <t t-out="userTimezoneStopDate.format('L LTS')"/></li>
|
||||
<li><strong>Workcenter: </strong> <t t-out="workcenter_id[1]"/></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</templates>
|
||||
</gantt>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="workcenter_line_kanban">
|
||||
<field name="name">mrp.production.work.order.kanban</field>
|
||||
<field name="model">mrp.workorder</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban class="oe_background_grey o_kanban_dashboard o_mrp_workorder_kanban" create="0" sample="1">
|
||||
<field name="name"/>
|
||||
<field name="production_id"/>
|
||||
<field name="state" readonly="1"/>
|
||||
<field name="is_user_working"/>
|
||||
<field name="working_user_ids"/>
|
||||
<kanban class="o_mrp_workorder_kanban" create="0" sample="1">
|
||||
<field name="last_working_user_id"/>
|
||||
<field name="workcenter_id" invisible="True"/>
|
||||
<field name="product_uom_id" invisible="True" force_save="True"/>
|
||||
<field name="working_user_ids"/>
|
||||
<field name="working_state"/>
|
||||
<field name="workcenter_id"/>
|
||||
<field name="product_id"/>
|
||||
<field name="qty_remaining"/>
|
||||
<field name="qty_production"/>
|
||||
<field name="date_planned_start"/>
|
||||
<field name="date_start"/>
|
||||
<field name="production_date"/>
|
||||
<field name="product_uom_id" force_save="1"/>
|
||||
<field name="operation_id"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div class="oe_kanban_global_click">
|
||||
<div class="o_kanban_card_header o_kanban_record_top">
|
||||
<div class="o_kanban_workorder_title">
|
||||
<h4 class="o_primary">
|
||||
<span><t t-out="record.production_id.value"/></span> - <span><t t-out="record.name.value"/></span>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="o_kanban_workorder_date">
|
||||
<h5><span class="d-flex" t-esc="record.date_planned_start.value or record.production_date.value"/></h5>
|
||||
</div>
|
||||
<div>
|
||||
<h2 class="ml8">
|
||||
<span t-attf-class="badge #{['progress'].indexOf(record.state.raw_value) > -1 ? 'text-bg-warning' : ['ready', 'waiting', 'pending'].indexOf(record.state.raw_value) > -1 ? 'text-bg-primary' : ['done'].indexOf(record.state.raw_value) > -1 ? 'text-bg-success' : 'text-bg-danger'}">
|
||||
<t t-out="record.state.value"/>
|
||||
</span>
|
||||
</h2>
|
||||
</div>
|
||||
<t t-name="card">
|
||||
<div class="d-flex o_kanban_record_top">
|
||||
<div class="o_kanban_workorder_title h4">
|
||||
<field name="production_id"/> - <field name="name"/>
|
||||
</div>
|
||||
<div class="o_kanban_record_bottom">
|
||||
<h5 class="oe_kanban_bottom_left">
|
||||
<span><t t-out="record.product_id.value"/>, </span> <span><t t-out="record.qty_production.value"/> <t t-out="record.product_uom_id.value"/></span>
|
||||
</h5>
|
||||
<div class="o_kanban_workorder_status">
|
||||
<div class="o_kanban_record_bottom">
|
||||
<div class="oe_kanban_bottom_right" t-if="record.state.raw_value == 'progress'">
|
||||
<span t-if="record.working_state.raw_value != 'blocked' and record.working_user_ids.raw_value.length > 0"><i class="fa fa-play" role="img" aria-label="Run" title="Run"/></span>
|
||||
<span t-if="record.working_state.raw_value != 'blocked' and record.working_user_ids.raw_value.length == 0 and record.last_working_user_id.raw_value"><i class="fa fa-pause" role="img" aria-label="Pause" title="Pause"/></span>
|
||||
<span t-if="record.working_state.raw_value == 'blocked' and (record.working_user_ids.raw_value.length == 0 or record.last_working_user_id.raw_value)"><i class="fa fa-stop" role="img" aria-label="Stop" title="Stop"/></span>
|
||||
<t name="user_avatar" t-if="record.last_working_user_id.raw_value">
|
||||
<img t-att-src="kanban_image('res.users', 'avatar_128', record.last_working_user_id.raw_value)" class="oe_kanban_avatar" alt="Avatar"/>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="o_kanban_workorder_date h5">
|
||||
<field name="date_start"/>
|
||||
<field t-if="!record.date_start.raw_value" name="production_date"/>
|
||||
</div>
|
||||
<div class="h2 ms-2">
|
||||
<span t-attf-class="badge #{['progress'].indexOf(record.state.raw_value) > -1 ? 'text-bg-warning' : ['ready', 'blocked'].indexOf(record.state.raw_value) > -1 ? 'text-bg-primary' : ['done'].indexOf(record.state.raw_value) > -1 ? 'text-bg-success' : 'text-bg-danger'}">
|
||||
<field name="state"/>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<footer>
|
||||
<h5>
|
||||
<field name="product_id"/>, <field name="qty_production" class="ms-1"/> <field name="product_uom_id" groups="uom.group_uom"/><t t-if="record.finished_lot_ids.value">, </t> <field t-if="record.finished_lot_ids.value" name="finished_lot_ids" class="ms-1"/>
|
||||
</h5>
|
||||
<div class="o_kanban_workorder_status d-flex ms-auto" t-if="record.state.raw_value == 'progress'">
|
||||
<span t-if="record.working_state.raw_value != 'blocked' and record.working_user_ids.raw_value.length > 0" class="fa fa-play fs-6" role="img" aria-label="Is running" title="Is running"/>
|
||||
<span t-if="record.working_state.raw_value != 'blocked' and record.working_user_ids.raw_value.length == 0 and record.last_working_user_id.raw_value" class="fa fa-pause" role="img" aria-label="Is paused" title="Is paused"/>
|
||||
<span t-if="record.working_state.raw_value == 'blocked' and (record.working_user_ids.raw_value.length == 0 or record.last_working_user_id.raw_value)" class="fa fa-stop" role="img" aria-label="Is stopped" title="Is stopped"/>
|
||||
<field t-if="record.last_working_user_id.raw_value" name="last_working_user_id" widget="image" options="{'preview_image': 'avatar_128'}" class="ms-1 o_avatar"/>
|
||||
</div>
|
||||
</footer>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
|
|
@ -455,12 +386,11 @@
|
|||
|
||||
<record model="ir.actions.act_window" id="action_mrp_workorder_workcenter">
|
||||
<field name="name">Work Orders Planning</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.workorder</field>
|
||||
<field name="view_mode">gantt,tree,form,calendar,pivot,graph</field>
|
||||
<field name="path">workcenter-planning</field>
|
||||
<field name="view_mode">list,form,calendar,pivot,graph</field>
|
||||
<field name="search_view_id" ref="view_mrp_production_workorder_form_view_filter"/>
|
||||
<field name="view_id" ref="mrp_workorder_view_gantt"/>
|
||||
<field name="context">{'search_default_work_center': True, 'search_default_ready': True, 'search_default_waiting': True, 'search_default_progress': True, 'search_default_pending': True}</field>
|
||||
<field name="context">{'search_default_work_center': True, 'search_default_ready': True, 'search_default_blocked': True, 'search_default_progress': True, 'show_workcenter_status': True}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
No work orders to do!
|
||||
|
|
@ -473,13 +403,12 @@
|
|||
|
||||
<record model="ir.actions.act_window" id="action_mrp_workorder_production">
|
||||
<field name="name">Work Orders Planning</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.workorder</field>
|
||||
<field name="path">production-planning</field>
|
||||
<field name="domain">[('production_state','not in',('done','cancel'))]</field>
|
||||
<field name="view_mode">gantt,tree,form,calendar,pivot,graph</field>
|
||||
<field name="view_mode">list,form,calendar,pivot,graph</field>
|
||||
<field name="search_view_id" ref="view_mrp_production_workorder_form_view_filter"/>
|
||||
<field name="view_id" ref="workcenter_line_gantt_production"/>
|
||||
<field name="context">{'search_default_production': True, 'search_default_ready': True, 'search_default_waiting': True, 'search_default_progress': True, 'search_default_pending': True}</field>
|
||||
<field name="context">{'search_default_production': True, 'search_default_ready': True, 'search_default_blocked': True, 'search_default_progress': True}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
No work orders to do!
|
||||
|
|
@ -492,7 +421,6 @@
|
|||
|
||||
<record model="ir.actions.act_window" id="mrp_workorder_mrp_production_form">
|
||||
<field name="name">Work Orders</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.workorder</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
|
|
@ -501,11 +429,12 @@
|
|||
|
||||
<record model="ir.actions.act_window" id="mrp_workorder_todo">
|
||||
<field name="name">Work Orders</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.workorder</field>
|
||||
<field name="view_mode">tree,kanban,form,calendar,pivot,graph,gantt</field>
|
||||
<field name="path">work-orders</field>
|
||||
<field name="view_mode">list,kanban,form,calendar,pivot,graph</field>
|
||||
<field name="view_id" ref="mrp.mrp_production_workorder_tree_view"/>
|
||||
<field name="search_view_id" ref="view_mrp_production_workorder_form_view_filter"/>
|
||||
<field name="context">{'search_default_ready': True, 'search_default_progress': True, 'search_default_pending': True, 'search_default_waiting': True}</field>
|
||||
<field name="context">{'search_default_ready': True, 'search_default_progress': True, 'search_default_blocked': True}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
No work orders to do!
|
||||
|
|
@ -542,7 +471,6 @@
|
|||
|
||||
<record id="action_mrp_workcenter_load_report_graph" model="ir.actions.act_window">
|
||||
<field name="name">Work Center Loads</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.workorder</field>
|
||||
<field name="view_mode">graph,pivot</field>
|
||||
<field name="view_id" ref="view_workcenter_load_pivot"/>
|
||||
|
|
@ -558,4 +486,22 @@
|
|||
<field name="view_id" ref="view_work_center_load_graph"/>
|
||||
<field name="act_window_id" ref="action_mrp_workcenter_load_report_graph"/>
|
||||
</record>
|
||||
|
||||
<record id="action_start_workorders" model="ir.actions.server">
|
||||
<field name="name">Start</field>
|
||||
<field name="model_id" ref="mrp.model_mrp_workorder"/>
|
||||
<field name="binding_model_id" ref="mrp.model_mrp_workorder"/>
|
||||
<field name="binding_view_types">list,kanban</field>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = records.button_start(raise_on_invalid_state=True)</field>
|
||||
</record>
|
||||
|
||||
<record id="action_pause_workorders" model="ir.actions.server">
|
||||
<field name="name">Pause</field>
|
||||
<field name="model_id" ref="mrp.model_mrp_workorder"/>
|
||||
<field name="binding_model_id" ref="mrp.model_mrp_workorder"/>
|
||||
<field name="binding_view_types">list,kanban</field>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = records.button_pending()</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<record id="product_document_form" model="ir.ui.view">
|
||||
<field name="name">product.document.form.mrp</field>
|
||||
<field name="model">product.document</field>
|
||||
<field name="inherit_id" ref="product.product_document_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<sheet position="inside">
|
||||
<group name="mrp" string="Manufacturing" groups="mrp.group_mrp_user">
|
||||
<field name="attached_on_mrp" class="oe_inline"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -7,150 +7,70 @@
|
|||
<field name="priority" eval="35"/>
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||
<div class="app_settings_block" data-string="Manufacturing" string="Manufacturing" data-key="mrp" groups="mrp.group_mrp_manager">
|
||||
<h2>Operations</h2>
|
||||
<div class="row mt16 o_settings_container" name="process_operations_setting_container">
|
||||
<div class="col-lg-6 col-12 o_setting_box" id="work_order" title="Work Order Operations allow you to create and manage the manufacturing operations that should be followed within your work centers in order to produce a product. They are attached to bills of materials that will define the required components.">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="group_mrp_routings"/>
|
||||
<field name="module_mrp_workorder" invisible="1"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane" id="workorder_settings">
|
||||
<label for="group_mrp_routings" string="Work Orders"/>
|
||||
<a href="https://www.odoo.com/documentation/16.0/applications/inventory_and_mrp/manufacturing/management/bill_configuration.html#adding-a-routing" title="Documentation" class="o_doc_link" target="_blank"></a>
|
||||
<div class="text-muted">
|
||||
Process operations at specific work centers
|
||||
</div>
|
||||
<div id="workorder_settings_workcenters" class="content-group" attrs="{'invisible': [('group_mrp_routings','=',False)]}">
|
||||
<div class="mt8">
|
||||
<div>
|
||||
<button name="%(mrp.mrp_workcenter_action)d" icon="fa-arrow-right" type="action" string="Work Centers" class="btn-link"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="workorder_settings_dependencies" class="row mt-2" attrs="{'invisible': [('group_mrp_routings','=',False)]}">
|
||||
<field name="group_mrp_workorder_dependencies" class="col flex-grow-0 ml16 mr0 pe-2"/>
|
||||
<div class="col ps-0">
|
||||
<label for="group_mrp_workorder_dependencies"/>
|
||||
<div class="text-muted">
|
||||
Set the order that work orders should be processed in. Activate the feature within each BoM's Miscellaneous tab
|
||||
</div>
|
||||
<xpath expr="//form" position="inside">
|
||||
<app data-string="Manufacturing" string="Manufacturing" name="mrp" groups="mrp.group_mrp_manager">
|
||||
<block title="Operations" name="process_operations_setting_container">
|
||||
<setting id="work_order" string="Work Orders" help="Process operations at specific work centers" documentation="/applications/inventory_and_mrp/manufacturing/management/bill_configuration.html#adding-a-routing" title="Work Order Operations allow you to create and manage the manufacturing operations that should be followed within your work centers in order to produce a product. They are attached to bills of materials that will define the required components.">
|
||||
<field name="group_mrp_routings"/>
|
||||
<div id="workorder_settings_workcenters" class="content-group" invisible="not group_mrp_routings">
|
||||
<div class="mt8">
|
||||
<div>
|
||||
<button name="%(mrp.mrp_workcenter_action)d" icon="oi-arrow-right" type="action" string="Work Centers" class="btn-link"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 col-12 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_mrp_subcontracting"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="module_mrp_subcontracting"/>
|
||||
<a href="https://www.odoo.com/documentation/16.0/applications/inventory_and_mrp/manufacturing/management/subcontracting.html" title="Documentation" class="o_doc_link" target="_blank"></a>
|
||||
<div class="text-muted">
|
||||
Subcontract the production of some products
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 col-12 o_setting_box" id="quality_control_mrp">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_quality_control" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="module_quality_control"/>
|
||||
<div class="text-muted">
|
||||
Add quality checks to your work orders
|
||||
</div>
|
||||
<div class="row mt-2" attrs="{'invisible': [('module_quality_control','=',False)]}">
|
||||
<field name="module_quality_control_worksheet" widget="upgrade_boolean" class="col flex-grow-0 ml16 mr0 pe-2"/>
|
||||
<div class="col ps-0">
|
||||
<label for="module_quality_control_worksheet"/>
|
||||
<div class="text-muted">
|
||||
Create customizable worksheets for your quality checks
|
||||
</div>
|
||||
<div id="workorder_settings_dependencies" class="row mt-2" invisible="not group_mrp_routings">
|
||||
<field name="group_mrp_workorder_dependencies" class="col flex-grow-0 ml16 mr0 pe-2"/>
|
||||
<div class="col ps-0">
|
||||
<label for="group_mrp_workorder_dependencies"/>
|
||||
<div class="text-muted">
|
||||
Set the order that work orders should be processed in. Activate the feature within each BoM's Miscellaneous tab
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 col-12 o_setting_box" id="mrp_lock">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="group_unlocked_by_default"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="group_unlocked_by_default"/>
|
||||
<div class="text-muted">
|
||||
Allow manufacturing users to modify quantities to consume, without the need for prior approval
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 col-12 o_setting_box" id="mrp_byproduct" title="Add by-products to bills of materials. This can be used to get several finished products as well. Without this option you only do: A + B = C. With the option: A + B = C + D.">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="group_mrp_byproducts"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="group_mrp_byproducts"/>
|
||||
<div class="text-muted">
|
||||
Produce residual products (A + B -> C + D)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 o_setting_box" id="mrp_reception_report">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="group_mrp_reception_report"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="group_mrp_reception_report"/>
|
||||
<div class="text-muted">
|
||||
View and allocate manufactured quantities
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Planning</h2>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-lg-6 col-12 o_setting_box" id="mrp_mps" title="Using a MPS report to schedule your reordering and manufacturing operations is useful if you have long lead time and if you produce based on sales forecasts.">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_mrp_mps" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="module_mrp_mps"/>
|
||||
<a href="https://www.odoo.com/documentation/16.0/applications/inventory_and_mrp/manufacturing/management/use_mps.html" title="Documentation" class="o_doc_link" target="_blank"></a>
|
||||
<div class="text-muted">
|
||||
Plan manufacturing or purchase orders based on forecasts
|
||||
</div>
|
||||
<div class="content-group" id="content_mrp_mps"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 col-12 o_setting_box" id="security_lead_time">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="use_manufacturing_lead"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="Security Lead Time" for="use_manufacturing_lead"/>
|
||||
<a href="https://www.odoo.com/documentation/16.0/applications/inventory_and_mrp/inventory/management/planning/scheduled_dates.html" title="Documentation" class="me-2 o_doc_link" target="_blank"></a>
|
||||
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific." role="img" aria-label="Values set here are company-specific." groups="base.group_multi_company"/>
|
||||
<div class="text-muted">
|
||||
Schedule manufacturing orders earlier to avoid delays
|
||||
</div>
|
||||
<div class="content-group" attrs="{'invisible': [('use_manufacturing_lead','=',False)]}">
|
||||
<div class="mt16" >
|
||||
<field name="manufacturing_lead" class="oe_inline"/> days
|
||||
</setting>
|
||||
<setting help="Delegate part of the production process to subcontractors" documentation="/applications/inventory_and_mrp/manufacturing/management/subcontracting.html">
|
||||
<field name="module_mrp_subcontracting"/>
|
||||
</setting>
|
||||
<setting id="process_mrp_barcodes" help="Process manufacturing orders from the barcode application">
|
||||
<field name="module_stock_barcode" widget="upgrade_boolean"/>
|
||||
</setting>
|
||||
<setting id="quality_control_mrp" help="Add quality checks to your work orders">
|
||||
<field name="module_quality_control" widget="upgrade_boolean"/>
|
||||
<div class="row mt-2" invisible="not module_quality_control">
|
||||
<field name="module_quality_control_worksheet" widget="upgrade_boolean" class="col flex-grow-0 ml16 mr0 pe-2"/>
|
||||
<div class="col ps-0">
|
||||
<label for="module_quality_control_worksheet"/>
|
||||
<div class="text-muted">
|
||||
Create customizable worksheets for your quality checks
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</setting>
|
||||
<setting help="Allow manufacturing users to modify quantities to consume, without the need for prior approval" id="mrp_lock">
|
||||
<field name="group_unlocked_by_default"/>
|
||||
</setting>
|
||||
<setting id="mrp_byproduct" help="Produce residual products (A + B -> C + D)" title="Add by-products to bills of materials. This can be used to get several finished products as well. Without this option you only do: A + B = C. With the option: A + B = C + D.">
|
||||
<field name="group_mrp_byproducts"/>
|
||||
</setting>
|
||||
<setting id="mrp_reception_report" help="View and allocate production quantities to customer orders or other manufacturing orders">
|
||||
<field name="group_mrp_reception_report"/>
|
||||
</setting>
|
||||
</block>
|
||||
<block title="Planning">
|
||||
<setting id="mrp_mps" help="Plan manufacturing or purchase orders based on forecasts" documentation="/applications/inventory_and_mrp/manufacturing/management/use_mps.html" title="Using a MPS report to schedule your reordering and manufacturing operations is useful if you have long lead time and if you produce based on sales forecasts.">
|
||||
<field name="module_mrp_mps" widget="upgrade_boolean"/>
|
||||
</setting>
|
||||
</block>
|
||||
</app>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_mrp_configuration" model="ir.actions.act_window">
|
||||
<field name="name">Settings</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">res.config.settings</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">inline</field>
|
||||
<field name="context">{'module' : 'mrp', 'bin_size': False}</field>
|
||||
</record>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,8 @@
|
|||
<odoo>
|
||||
<record model="ir.actions.act_window" id="action_mrp_production_moves">
|
||||
<field name="name">Inventory Moves</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">stock.move.line</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="domain">['|', ('move_id.raw_material_production_id', '=', active_id), ('move_id.production_id', '=', active_id)]</field>
|
||||
</record>
|
||||
|
||||
|
|
@ -16,10 +15,7 @@
|
|||
<field name="inherit_id" ref="stock.view_stock_move_operations" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//label[@for='product_uom_qty']" position="attributes">
|
||||
<attribute name="string">Total To Consume</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//label[@for='quantity_done']" position="attributes">
|
||||
<attribute name="string">Consumed</attribute>
|
||||
<attribute name="string">Total To Consume</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
|
@ -32,16 +28,26 @@
|
|||
<field name="inherit_id" ref="stock.view_stock_move_operations" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//label[@for='product_uom_qty']" position="attributes">
|
||||
<attribute name="string">To Produce</attribute>
|
||||
<attribute name="string">To Produce</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//label[@for='quantity_done']" position="attributes">
|
||||
<attribute name="string">Produced</attribute>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_mrp_stock_move_operations" model="ir.ui.view">
|
||||
<field name="name">stock.move.mrp.operations.raw.form</field>
|
||||
<field name="model">stock.move</field>
|
||||
<field name="priority">1</field>
|
||||
<field name="mode">primary</field>
|
||||
<field name="inherit_id" ref="stock.view_stock_move_operations" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='show_lots_m2o']" position="after">
|
||||
<field name="quantity" invisible="1"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_stock_move_line_operation_tree_finished" model="ir.ui.view">
|
||||
<field name="name">stock.move.line.operation.tree.finished</field>
|
||||
<field name="name">stock.move.line.operation.list.finished</field>
|
||||
<field name="model">stock.move.line</field>
|
||||
<field name="inherit_id" ref="stock.view_stock_move_line_operation_tree" />
|
||||
<field name="arch" type="xml">
|
||||
|
|
@ -49,7 +55,6 @@
|
|||
<attribute name="context">{
|
||||
'active_mo_id': context.get('active_mo_id'),
|
||||
'active_picking_id': picking_id,
|
||||
'default_company_id': parent.company_id,
|
||||
'default_product_id': parent.product_id,
|
||||
}
|
||||
</attribute>
|
||||
|
|
@ -69,6 +74,17 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_move_line_tree" model="ir.ui.view">
|
||||
<field name="name">stock.move.line.list</field>
|
||||
<field name="model">stock.move.line</field>
|
||||
<field name="inherit_id" ref="stock.view_move_line_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="reference" position="attributes">
|
||||
<attribute name="decoration-primary">picking_code == 'mrp_operation'</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_mrp_traceability"
|
||||
name="Lots/Serial Numbers"
|
||||
parent="menu_mrp_bom"
|
||||
|
|
@ -83,9 +99,8 @@
|
|||
sequence="25"/>
|
||||
|
||||
<menuitem id="menu_procurement_compute_mrp"
|
||||
action="stock.action_procurement_compute"
|
||||
action="stock.ir_cron_scheduler_action_ir_actions_server"
|
||||
parent="mrp_planning_menu_root"
|
||||
groups="base.group_no_one"
|
||||
sequence="135"/>
|
||||
|
||||
</odoo>
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="view_warehouse_orderpoint_tree_editable_inherited_purchase" model="ir.ui.view">
|
||||
<field name="name">stock.warehouse.orderpoint.tree.editable.inherit.purchase</field>
|
||||
<field name="name">stock.warehouse.orderpoint.list.editable.inherit.purchase</field>
|
||||
<field name="model">stock.warehouse.orderpoint</field>
|
||||
<field name="inherit_id" ref="stock.view_warehouse_orderpoint_tree_editable"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="route_id" position="after">
|
||||
<field name="show_bom" invisible="1"/>
|
||||
<field name="bom_id" optional="hide" attrs="{'invisible': [('show_bom', '=', False)]}" context="{'default_product_tmpl_id': product_tmpl_id}"/>
|
||||
<field name="show_bom" column_invisible="True"/>
|
||||
<field name="bom_id_placeholder" column_invisible="True"/> <!-- Needed for the placeholder widget -->
|
||||
<field name="bom_id" widget="stock.forced_placeholder" optional="hide" invisible="not show_bom" context="{'default_product_tmpl_id': product_tmpl_id, 'display_bom_uom_qty': True}" options="{'placeholder_field': 'bom_id_placeholder'}" decoration-muted="not bom_id"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
</odoo>
|
||||
|
|
|
|||
|
|
@ -5,95 +5,102 @@
|
|||
<field name="model">stock.picking.type</field>
|
||||
<field name="inherit_id" ref="stock.stock_picking_type_kanban"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="code" position="after">
|
||||
<field name="count_mo_todo"/>
|
||||
<field name="count_mo_waiting"/>
|
||||
<field name="count_mo_late"/>
|
||||
</field>
|
||||
|
||||
<xpath expr='//div[@name="stock_picking"]' position="after">
|
||||
<div t-if="record.code.raw_value == 'mrp_operation'" t-attf-class="#{!selection_mode ? kanban_color(record.color.raw_value) : ''}">
|
||||
<div>
|
||||
<div t-attf-class="o_kanban_card_header">
|
||||
<div class="o_kanban_card_header_title">
|
||||
<div class="o_primary" t-if="!selection_mode">
|
||||
<a type="object" name="get_mrp_stock_picking_action_picking_type">
|
||||
<field name="name"/>
|
||||
</a>
|
||||
</div>
|
||||
<span class="o_primary" t-if="selection_mode"><field name="name"/></span>
|
||||
<div class="o_secondary"><field class="o_secondary" name="warehouse_id" readonly="1" groups="stock.group_stock_multi_warehouses"/></div>
|
||||
<xpath expr="//t[@t-name='menu']" position="inside">
|
||||
<div class="container" t-if="record.code.raw_value == 'mrp_operation'">
|
||||
<div class="row">
|
||||
<div class="col-6" name="picking_left_manage_pane">
|
||||
<h5 role="menuitem" class="o_kanban_card_manage_title">
|
||||
<span>Orders</span>
|
||||
</h5>
|
||||
<div role="menuitem">
|
||||
<a name="%(mrp_production_action_picking_deshboard)d" type="action">All</a>
|
||||
</div>
|
||||
<div class="o_kanban_manage_button_section" t-if="!selection_mode">
|
||||
<a class="o_kanban_manage_toggle_button" href="#"><i class="fa fa-ellipsis-v" role="img" aria-label="Manage" title="Manage"/></a>
|
||||
<div role="menuitem">
|
||||
<a name="%(mrp_production_action_picking_deshboard)d" type="action" context="{'search_default_inprogress': 1}">In Progress</a>
|
||||
</div>
|
||||
<div role="menuitem">
|
||||
<a name="%(mrp_production_action_picking_deshboard)d" type="action" context="{'search_default_planned': 1}">Planned</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container o_kanban_card_content" t-if="!selection_mode">
|
||||
<div class="row">
|
||||
<div class="col-6 o_kanban_primary_left">
|
||||
<button class="btn btn-primary" name="%(mrp_production_action_picking_deshboard)d" type="action" context="{'search_default_todo': 1, 'default_picking_type_id': active_id}">
|
||||
<span t-if="record.code.raw_value =='mrp_operation'"><t t-esc="record.count_mo_todo.value"/> To Process</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-6 o_kanban_primary_right">
|
||||
<div t-if="record.count_mo_waiting.raw_value > 0" class="row">
|
||||
<div class="col-9">
|
||||
<a name="%(mrp_production_action_picking_deshboard)d" type="action" context="{'search_default_waiting': 1}">
|
||||
Waiting
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<field name="count_mo_waiting"/>
|
||||
</div>
|
||||
</div>
|
||||
<div t-if="record.count_mo_late.raw_value > 0" class="row">
|
||||
<div class="col-9">
|
||||
<a class="oe_kanban_stock_picking_type_list" name="%(mrp_production_action_picking_deshboard)d" type="action" context="{'search_default_planning_issues': 1, 'default_picking_type_id': active_id}">
|
||||
Late
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<field name="count_mo_late"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div name="kanban_menu_section" class="col-6">
|
||||
<h5 role="menuitem" class="o_kanban_card_manage_title">
|
||||
<span>New</span>
|
||||
</h5>
|
||||
<div role="menuitem">
|
||||
<a name="%(action_mrp_production_form)d" context="{'default_picking_type_id': id}" type="action">Manufacturing Order</a>
|
||||
</div>
|
||||
</div><div class="container o_kanban_card_manage_pane dropdown-menu" role="menu">
|
||||
<div class="row">
|
||||
<div class="col-6 o_kanban_card_manage_section o_kanban_manage_view" name="picking_left_manage_pane">
|
||||
<div role="menuitem" class="o_kanban_card_manage_title">
|
||||
<span>Orders</span>
|
||||
</div>
|
||||
<div role="menuitem">
|
||||
<a name="%(mrp_production_action_picking_deshboard)d" type="action">All</a>
|
||||
</div>
|
||||
<div role="menuitem">
|
||||
<a name="%(mrp_production_action_picking_deshboard)d" type="action" context="{'search_default_inprogress': 1}">In Progress</a>
|
||||
</div>
|
||||
<div role="menuitem">
|
||||
<a name="%(mrp_production_action_picking_deshboard)d" type="action" context="{'search_default_planned': 1}">Planned</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 o_kanban_card_manage_section o_kanban_manage_new">
|
||||
<div role="menuitem" class="o_kanban_card_manage_title">
|
||||
<span>New</span>
|
||||
</div>
|
||||
<div role="menuitem">
|
||||
<a name="%(action_mrp_production_form)d" context="{'default_picking_type_id': active_id}" type="action">Manufacturing Order</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div t-if="widget.editable" class="o_kanban_card_manage_settings row">
|
||||
<div role="menuitem" aria-haspopup="true" class="col-8">
|
||||
<ul role="menu" class="oe_kanban_colorpicker" data-field="color"/>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<a class="dropdown-item" role="menuitem" type="edit">Configuration</a>
|
||||
</div>
|
||||
<div role="menuitem">
|
||||
<a name="get_action_picking_type_moves_analysis" type="object">Reporting</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div t-if="widget.editable" class="o_kanban_card_manage_settings row">
|
||||
<div role="menuitem" aria-haspopup="true" class="col-8">
|
||||
<field name="color" widget="kanban_color_picker"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div t-if="widget.editable" class="o_kanban_card_manage_settings row">
|
||||
<field name="is_favorite" widget="boolean_favorite" class="col-6"/>
|
||||
<div class="col-6 text-end">
|
||||
<a class="dropdown-item" role="menuitem" type="open">Configuration</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
<xpath expr='//div[@name="stock_picking"]' position="after">
|
||||
<div t-if="record.code.raw_value == 'mrp_operation'" class="px-2">
|
||||
<a t-if="!selection_mode" type="object" name="get_mrp_stock_picking_action_picking_type">
|
||||
<field name="name" class="fw-bold fs-4"/>
|
||||
</a>
|
||||
<field t-if="selection_mode" name="name" class="fw-bold fs-4"/>
|
||||
<field name="warehouse_id" class="d-block" groups="stock.group_stock_multi_warehouses"/>
|
||||
<div t-if="!selection_mode" class="row mt-3">
|
||||
<div class="col-6">
|
||||
<button class="btn btn-primary" name="%(mrp_production_action_picking_deshboard)d" type="action" context="{'search_default_filter_confirmed': 1, 'default_picking_type_id': id}">
|
||||
<span t-if="record.count_mo_todo.raw_value > 0">
|
||||
<field name="count_mo_todo"/> To Manufacture
|
||||
</span>
|
||||
<span t-else="">Open</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-6 stock-overview-links">
|
||||
<div t-if="record.count_mo_waiting.raw_value > 0" class="row">
|
||||
<a class="col-8 offset-4 text-truncate" name="%(mrp_production_action_picking_deshboard)d" type="action" context="{'search_default_waiting': 1}">
|
||||
<div class="row">
|
||||
<span class="col-6">Waiting</span>
|
||||
<field class="col-2 text-end" name="count_mo_waiting"/>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div t-if="record.count_mo_late.raw_value > 0" class="row">
|
||||
<a class="col-8 offset-4 text-truncate" name="%(mrp_production_action_picking_deshboard)d" type="action" context="{'search_default_filter_late_mo': 1, 'default_picking_type_id': id}">
|
||||
<div class="row">
|
||||
<span class="col-6">Late</span>
|
||||
<field class="col-2 text-end" name="count_mo_late"/>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div t-if="record.count_mo_in_progress.raw_value > 0" class="row">
|
||||
<a class="col-8 offset-4 text-truncate" name="%(mrp_production_action_picking_deshboard)d" type="action" context="{'search_default_filter_in_progress': 1, 'default_picking_type_id': id}">
|
||||
<div class="row">
|
||||
<span class="col-6">In Progress</span>
|
||||
<field class="col-2 text-end" name="count_mo_in_progress"/>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div t-if="record.count_mo_to_close.raw_value > 0" class="row">
|
||||
<a class="col-8 offset-4 text-truncate" name="%(mrp_production_action_picking_deshboard)d" type="action" context="{'search_default_filter_to_close': 1, 'default_picking_type_id': id}">
|
||||
<div class="row">
|
||||
<span class="col-6">To Close</span>
|
||||
<field class="col-2 text-end" name="count_mo_to_close"/>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<field t-if="!selection_mode" name="kanban_dashboard_graph" class="mt-auto" graph_type="bar" widget="picking_type_dashboard_graph"/>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
|
|
@ -104,22 +111,13 @@
|
|||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='use_create_lots']" position="after">
|
||||
<field name="has_kits" invisible="1"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='description_picking']" position="after">
|
||||
<field name="description_bom_line" optional="show" attrs="{'column_invisible': [('parent.has_kits', '=', False)]}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_stock_move_line_detailed_operation_tree_mrp" model="ir.ui.view">
|
||||
<field name="name">stock.move.line.operations.tree.mrp</field>
|
||||
<field name="model">stock.move.line</field>
|
||||
<field name="inherit_id" ref="stock.view_stock_move_line_detailed_operation_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='product_id']" position="after">
|
||||
<field name="description_bom_line" optional="show" attrs="{'column_invisible': [('parent.has_kits', '=', False)]}"/>
|
||||
<xpath expr="//button[@name='action_view_reception_report']" position="after">
|
||||
<button class="oe_stat_button" name="action_view_mrp_production" type="object" icon="fa-wrench" invisible="not production_count" groups="mrp.group_mrp_user">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="production_count"/></span>
|
||||
<span class="o_stat_text">Manufacturing</span>
|
||||
</div>
|
||||
</button>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
|
@ -129,21 +127,76 @@
|
|||
<field name="model">stock.picking.type</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_type_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="show_operations" position="attributes">
|
||||
<attribute name="attrs">{"invisible": [("code", "=", "mrp_operation")]}</attribute>
|
||||
</field>
|
||||
<field name="create_backorder" position="attributes">
|
||||
<attribute name="attrs">{"invisible": [("code", "=", "mrp_operation")]}</attribute>
|
||||
</field>
|
||||
<xpath expr="//group[@name='stock_picking_type_lot']" position="after">
|
||||
<group attrs='{"invisible": [("code", "!=", "mrp_operation")]}' string="Traceability" groups="stock.group_production_lot">
|
||||
<group invisible="code != 'mrp_operation'" string="Traceability" groups="stock.group_production_lot">
|
||||
<field name="use_create_components_lots"/>
|
||||
<field name="use_auto_consume_components_lots"/>
|
||||
</group>
|
||||
</xpath>
|
||||
<field name="auto_show_reception_report" position="after">
|
||||
<field name="auto_show_reception_report" attrs="{'invisible': [('code', '!=', 'mrp_operation')]}" groups="mrp.group_mrp_reception_report"/>
|
||||
<field name="auto_show_reception_report" invisible="code != 'mrp_operation'" groups="mrp.group_mrp_reception_report"/>
|
||||
</field>
|
||||
<xpath expr="//page[@name='hardware']" position="after">
|
||||
<page name="mrp_hardware" string="Hardware" invisible="code != 'mrp_operation'">
|
||||
<group>
|
||||
<group string="Print when done">
|
||||
<field name="auto_print_done_production_order" string="Production Order"/>
|
||||
<label for="auto_print_done_mrp_product_labels" string="Product Labels"/>
|
||||
<div class="o_row">
|
||||
<field name="auto_print_done_mrp_product_labels" string="Product Labels"/>
|
||||
<label for="mrp_product_label_to_print" string="Print labels as:" invisible="not auto_print_done_mrp_product_labels" class="fw-bold"/>
|
||||
<field name="mrp_product_label_to_print" invisible="not auto_print_done_mrp_product_labels"/>
|
||||
</div>
|
||||
<label for="auto_print_done_mrp_lot" string="Lot/SN Labels" groups="stock.group_production_lot"/>
|
||||
<div class="o_row" groups="stock.group_production_lot">
|
||||
<field name="auto_print_done_mrp_lot" string="Lot/SN Labels"/>
|
||||
<label for="done_mrp_lot_label_to_print" string="Print labels as:" invisible="not auto_print_done_mrp_lot" class="fw-bold"/>
|
||||
<field name="done_mrp_lot_label_to_print" invisible="not auto_print_done_mrp_lot"/>
|
||||
</div>
|
||||
<field name="auto_print_mrp_reception_report" string="Allocation Report" groups="mrp.group_mrp_reception_report"/>
|
||||
<field name="auto_print_mrp_reception_report_labels" string="Allocation Report Labels" groups="mrp.group_mrp_reception_report"/>
|
||||
</group>
|
||||
<group string="">
|
||||
<div colspan="2">
|
||||
Odoo opens a PDF preview by default. If you want to print instantly,
|
||||
install the IoT App on a computer that is on the same local network as the
|
||||
barcode operator and configure the routing of the reports.
|
||||
<widget name="documentation_link" path="/applications/productivity/iot/devices/printer.html" label="Documentation" icon="fa-arrow-right"/>
|
||||
</div>
|
||||
</group>
|
||||
<group string='Print when "Create new Lot/SN"' groups="stock.group_production_lot">
|
||||
<label for="auto_print_generated_mrp_lot" string="Lot/SN Label"/>
|
||||
<div class="o_row">
|
||||
<field name="auto_print_generated_mrp_lot" string="Lot/SN Label"/>
|
||||
<label for="generated_mrp_lot_label_to_print" string="Print labels as:" invisible="not auto_print_generated_mrp_lot" class="fw-bold"/>
|
||||
<field name="generated_mrp_lot_label_to_print" invisible="not auto_print_generated_mrp_lot"/>
|
||||
</div>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_picking_tree_mrp_operation" model="ir.actions.act_window">
|
||||
<field name="name">Manufacturings</field>
|
||||
<field name="res_model">mrp.production</field>
|
||||
<field name="path">manufacturings</field>
|
||||
<field name="view_mode">list,kanban,form,calendar,activity</field>
|
||||
<field name="domain"></field>
|
||||
<field name="context">{'default_company_id': allowed_company_ids[0]}</field>
|
||||
<field name="search_view_id" ref="mrp.view_mrp_production_filter"/>
|
||||
</record>
|
||||
|
||||
<record id="action_picking_tree_mrp_operation_graph" model="ir.actions.act_window">
|
||||
<field name="name">Manufacturings</field>
|
||||
<field name="res_model">mrp.production</field>
|
||||
<field name="view_mode">list,kanban,form,calendar,activity</field>
|
||||
<field name="domain"></field>
|
||||
<field name="context">{'search_default_filter_confirmed': 1}</field>
|
||||
<field name="search_view_id" ref="mrp.view_mrp_production_filter"/>
|
||||
</record>
|
||||
|
||||
<menuitem id="mrp_operation_picking" name="Manufacturings" parent="stock.menu_stock_transfers"
|
||||
action="action_picking_tree_mrp_operation" sequence="25"
|
||||
groups="stock.group_stock_manager,stock.group_stock_user"/>
|
||||
</odoo>
|
||||
|
|
|
|||
15
odoo-bringout-oca-ocb-mrp/mrp/views/stock_rule_views.xml
Normal file
15
odoo-bringout-oca-ocb-mrp/mrp/views/stock_rule_views.xml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="view_stock_rule_form" model="ir.ui.view">
|
||||
<field name="name">stock.rule.form.inherit.mrp</field>
|
||||
<field name="model">stock.rule</field>
|
||||
<field name="inherit_id" ref="stock.view_stock_rule_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="location_dest_from_rule" position="attributes">
|
||||
<attribute name="invisible">action not in ['pull', 'pull_push', 'manufacture']</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
@ -6,8 +6,11 @@
|
|||
<field name="inherit_id" ref="stock.stock_scrap_form_view2"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="owner_id" position="after">
|
||||
<field name="workorder_id" invisible="1"/>
|
||||
<field name="production_id" invisible="1"/>
|
||||
<field name="workorder_id" invisible="1" readonly="state == 'done'"/>
|
||||
<field name="production_id" invisible="1" readonly="state == 'done'"/>
|
||||
<field name="product_is_kit" invisible="1"/>
|
||||
<field name="product_template" invisible="1"/>
|
||||
<field name="bom_id" invisible="not product_is_kit" readonly="state == 'done'" required="product_is_kit"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
|
@ -17,8 +20,11 @@
|
|||
<field name="inherit_id" ref="stock.stock_scrap_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="owner_id" position="after">
|
||||
<field name="workorder_id" domain="[('production_id', '=', product_id)]" attrs="{'invisible': [('workorder_id', '=', False)]}"/>
|
||||
<field name="production_id" domain="[('company_id', '=', company_id)]" attrs="{'invisible': [('production_id', '=', False)]}"/>
|
||||
<field name="workorder_id" domain="[('production_id', '=', product_id)]" invisible="not workorder_id" readonly="state == 'done'"/>
|
||||
<field name="production_id" domain="[('company_id', '=', company_id)]" invisible="not production_id" readonly="state == 'done'"/>
|
||||
<field name="product_is_kit" invisible="1"/>
|
||||
<field name="product_template" invisible="1"/>
|
||||
<field name="bom_id" invisible="not product_is_kit" readonly="state == 'done'" required="product_is_kit"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
|
@ -28,6 +34,10 @@
|
|||
<field name="model">stock.scrap</field>
|
||||
<field name="inherit_id" ref="stock.stock_scrap_search_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='create_date']" position="after">
|
||||
<filter string="Draft" name="filter_draft" domain="[('state', '=', 'draft')]"/>
|
||||
<filter string="Done" name="filter_done" domain="[('state', '=', 'done')]"/>
|
||||
</xpath>
|
||||
<xpath expr="//filter[@name='transfer']" position="after">
|
||||
<filter string="Manufacturing Order" name="production_id" domain="[]" context="{'group_by':'production_id'}"/>
|
||||
</xpath>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='resupply_wh_ids']" position="before">
|
||||
<field name="manufacture_to_resupply"/>
|
||||
<field name="manufacture_steps" attrs="{'invisible': [('manufacture_to_resupply', '=', False)]}" widget="radio" groups="stock.group_adv_location"/>
|
||||
<field name="manufacture_steps" invisible="not manufacture_to_resupply" widget="radio" groups="stock.group_adv_location"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='out_type_id']" position="after">
|
||||
<field name="manu_type_id" readonly="True"/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue