[IMP] mrp: mrp_view.xml cleanup
- Reorder views per model and per actions - Remove dead views and actions - Flatten configuration menu, only the resource submenu is kept - Rename mrp_bom_tree_view to mrp_bom_line_tree_view (no other xmlids where harmed in this commit) - Add a view mrp_bom_tree_view for bom list with name and product variant when group_product_variant is enabled
This commit is contained in:
+271
-333
@@ -3,27 +3,52 @@
|
||||
<data>
|
||||
|
||||
<!-- Top menu item -->
|
||||
<menuitem name="Manufacturing"
|
||||
id="base.menu_mrp_root"
|
||||
<menuitem id="base.menu_mrp_root"
|
||||
name="Manufacturing"
|
||||
groups="group_mrp_user,group_mrp_manager"
|
||||
icon="fa-wrench"
|
||||
web_icon="mrp,static/description/icon.png"
|
||||
sequence="35"/>
|
||||
|
||||
<menuitem name="Manufacturing"
|
||||
id="menu_mrp_manufacturing"
|
||||
<menuitem id="menu_mrp_manufacturing"
|
||||
name="Manufacturing"
|
||||
parent="base.menu_mrp_root"
|
||||
sequence="1"/>
|
||||
|
||||
<menuitem name="Products"
|
||||
id="menu_mrp_bom"
|
||||
<menuitem id="menu_mrp_planning"
|
||||
name="Planning"
|
||||
parent="base.menu_mrp_root"
|
||||
sequence="2"/>
|
||||
|
||||
<menuitem id="menu_mrp_bom"
|
||||
name="Products"
|
||||
parent="base.menu_mrp_root"
|
||||
sequence="5"/>
|
||||
|
||||
<!--
|
||||
Property / Property Group
|
||||
-->
|
||||
<menuitem id="menu_mrp_configuration"
|
||||
name="Configuration"
|
||||
parent="base.menu_mrp_root"
|
||||
groups="group_mrp_manager,base.group_configuration"
|
||||
sequence="100"/>
|
||||
|
||||
<menuitem id="menu_pm_resources_config"
|
||||
name="Resources"
|
||||
parent="menu_mrp_configuration"
|
||||
sequence="100"/>
|
||||
|
||||
<menuitem id="menu_view_resource_calendar_search_mrp"
|
||||
action="resource.action_resource_calendar_form"
|
||||
parent="menu_pm_resources_config"
|
||||
sequence="10"
|
||||
groups="base.group_no_one"/>
|
||||
|
||||
<menuitem id="menu_view_resource_calendar_leaves_search_mrp"
|
||||
action="resource.action_resource_calendar_leave_tree"
|
||||
parent="menu_pm_resources_config"
|
||||
sequence="20"
|
||||
groups="base.group_no_one"/>
|
||||
|
||||
<!-- Property Group -->
|
||||
<record id="mrp_property_group_form_view" model="ir.ui.view">
|
||||
<field name="name">mrp.property.group.form</field>
|
||||
<field name="model">mrp.property.group</field>
|
||||
@@ -59,27 +84,13 @@
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<menuitem
|
||||
id="menu_mrp_configuration"
|
||||
name="Configuration"
|
||||
parent="base.menu_mrp_root"
|
||||
groups="group_mrp_manager,base.group_configuration"
|
||||
sequence="100"/>
|
||||
<menuitem
|
||||
id="menu_mrp_configuration_manufacturing"
|
||||
name="Manufacturing"
|
||||
<menuitem id="menu_mrp_property_group_action"
|
||||
action="mrp_property_group_action"
|
||||
parent="menu_mrp_configuration"
|
||||
groups="group_mrp_manager"
|
||||
sequence="1"/>
|
||||
<menuitem
|
||||
id="menu_mrp_configuration_products"
|
||||
name="Products"
|
||||
parent="menu_mrp_configuration"
|
||||
groups="group_mrp_manager"
|
||||
sequence="2"/>
|
||||
|
||||
|
||||
groups="base.group_no_one,product.group_mrp_properties"
|
||||
sequence="35"/>
|
||||
|
||||
<!-- Property -->
|
||||
<record id="mrp_property_tree_view" model="ir.ui.view">
|
||||
<field name="name">mrp.property.tree</field>
|
||||
<field name="model">mrp.property</field>
|
||||
@@ -106,7 +117,6 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_mrp_property_search" model="ir.ui.view">
|
||||
<field name="name">mrp.property.search</field>
|
||||
<field name="model">mrp.property</field>
|
||||
@@ -121,8 +131,6 @@
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="mrp_property_action" model="ir.actions.act_window">
|
||||
<field name="name">Properties</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
@@ -144,28 +152,13 @@
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<menuitem name="Master Bill of Materials"
|
||||
id="menu_mrp_property"
|
||||
parent="menu_mrp_configuration"
|
||||
groups="mrp.group_mrp_routings,product.group_mrp_properties"
|
||||
sequence="20"/>
|
||||
<menuitem
|
||||
<menuitem id="menu_mrp_property_action"
|
||||
action="mrp_property_action"
|
||||
id="menu_mrp_property_action"
|
||||
groups="product.group_mrp_properties"
|
||||
parent="menu_mrp_configuration_products"
|
||||
parent="menu_mrp_configuration"
|
||||
sequence="30"/>
|
||||
<menuitem
|
||||
action="mrp_property_group_action"
|
||||
parent="menu_mrp_configuration_products"
|
||||
groups="base.group_no_one,product.group_mrp_properties"
|
||||
id="menu_mrp_property_group_action"
|
||||
sequence="35"/>
|
||||
|
||||
<!--
|
||||
Work Centers
|
||||
-->
|
||||
|
||||
<!-- Work Centers -->
|
||||
<record id="mrp_workcenter_tree_view" model="ir.ui.view">
|
||||
<field name="name">mrp.workcenter.tree</field>
|
||||
<field name="model">mrp.workcenter</field>
|
||||
@@ -222,9 +215,6 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Search Views -->
|
||||
|
||||
<record id="view_mrp_workcenter_search" model="ir.ui.view">
|
||||
<field name="name">mrp.workcenter.search</field>
|
||||
<field name="model">mrp.workcenter</field>
|
||||
@@ -241,10 +231,7 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Routings
|
||||
-->
|
||||
|
||||
<!-- Routings Workcenter -->
|
||||
<record id="mrp_routing_workcenter_tree_view" model="ir.ui.view">
|
||||
<field name="name">mrp.routing.workcenter.tree</field>
|
||||
<field name="model">mrp.routing.workcenter</field>
|
||||
@@ -259,7 +246,6 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_routing_workcenter_form_view" model="ir.ui.view">
|
||||
<field name="name">mrp.routing.workcenter.form</field>
|
||||
<field name="model">mrp.routing.workcenter</field>
|
||||
@@ -278,7 +264,31 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<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="res_model">mrp.workcenter</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="mrp_workcenter_tree_view"/>
|
||||
<field name="search_view_id" ref="view_mrp_workcenter_search"/>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Click to add a work center.
|
||||
</p><p>
|
||||
Work Centers allow you to create and manage manufacturing
|
||||
units. They consist of workers and/or machines, which are
|
||||
considered as units for task assignation as well as capacity
|
||||
and planning forecast.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<menuitem id="menu_view_resource_search_mrp"
|
||||
action="mrp_workcenter_action"
|
||||
groups="group_mrp_routings"
|
||||
parent="menu_mrp_configuration"
|
||||
sequence="40"/>
|
||||
|
||||
<!-- Routings -->
|
||||
<record id="mrp_routing_form_view" model="ir.ui.view">
|
||||
<field name="name">mrp.routing.form</field>
|
||||
<field name="model">mrp.routing</field>
|
||||
@@ -351,12 +361,13 @@
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<menuitem action="mrp_routing_action" id="menu_mrp_routing_action" parent="menu_mrp_configuration_manufacturing" groups="mrp.group_mrp_routings" sequence="15"/>
|
||||
|
||||
<!--
|
||||
Bill of Materials
|
||||
-->
|
||||
<menuitem id="menu_mrp_routing_action"
|
||||
action="mrp_routing_action"
|
||||
parent="menu_mrp_configuration"
|
||||
groups="group_mrp_routings"
|
||||
sequence="50"/>
|
||||
|
||||
<!-- Bill of Materials -->
|
||||
<record id="mrp_bom_form_view" model="ir.ui.view">
|
||||
<field name="name">mrp.bom.form</field>
|
||||
<field name="model">mrp.bom</field>
|
||||
@@ -435,7 +446,16 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_tree_view" model="ir.ui.view">
|
||||
<field name="name">mrp.bom.tree</field>
|
||||
<field name="model">mrp.bom</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Bill of Materials">
|
||||
<field name="name"/>
|
||||
<field name="product_id" groups="product.group_product_variant"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_mrp_bom_filter" model="ir.ui.view">
|
||||
<field name="name">mrp.bom.select</field>
|
||||
<field name="model">mrp.bom</field>
|
||||
@@ -456,24 +476,6 @@
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_tree_view" model="ir.ui.view">
|
||||
<field name="name">mrp.bom.tree</field>
|
||||
<field name="model">mrp.bom.line</field>
|
||||
<field name="field_parent">child_line_ids</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Bill of Materials">
|
||||
<field name="sequence" invisible="1"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_uom" options="{'no_open':True,'no_create':True}" groups="product.group_uom"/>
|
||||
<field name="type"/>
|
||||
<field name="routing_id" groups="mrp.group_mrp_routings"/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_stop"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_form_action" model="ir.actions.act_window">
|
||||
<field name="name">Bill of Materials</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
@@ -483,7 +485,7 @@
|
||||
<field name="search_view_id" ref="view_mrp_bom_filter"/>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Click to create a bill of material.
|
||||
Click to create a bill of material.
|
||||
</p><p>
|
||||
Bills of Materials allow you to define the list of required raw
|
||||
materials used to make a finished product; through a manufacturing
|
||||
@@ -494,7 +496,12 @@
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<menuitem id="menu_mrp_bom_form_action"
|
||||
action="mrp_bom_form_action"
|
||||
parent="menu_mrp_bom"
|
||||
sequence="99"/>
|
||||
|
||||
<!-- BOM Line -->
|
||||
<record id="mrp_bom_component_tree_view" model="ir.ui.view">
|
||||
<field name="name">mrp.bom.component.tree</field>
|
||||
<field name="model">mrp.bom.line</field>
|
||||
@@ -518,7 +525,22 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_line_tree_view" model="ir.ui.view">
|
||||
<field name="name">mrp.bom.tree</field>
|
||||
<field name="model">mrp.bom.line</field>
|
||||
<field name="field_parent">child_line_ids</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Bill of Materials">
|
||||
<field name="sequence" invisible="1"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_uom" options="{'no_open':True,'no_create':True}" groups="product.group_uom"/>
|
||||
<field name="type"/>
|
||||
<field name="routing_id" groups="mrp.group_mrp_routings"/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_stop"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_mrp_bom_line_filter" model="ir.ui.view">
|
||||
<field name="name">mrp.bom.line.select</field>
|
||||
<field name="model">mrp.bom.line</field>
|
||||
@@ -537,59 +559,13 @@
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_template_search_view_procurment" model="ir.ui.view">
|
||||
<field name="name">product.template.search.bom</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="product.product_template_search_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//filter[@name='consumable']" position="after">
|
||||
<separator/>
|
||||
<filter string="Components" name="components" icon="terp-accessories-archiver" domain="[('bom_ids','not in',[])]"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_mrp_product_template_form_inherited" model="ir.ui.view">
|
||||
<field name="name">product.form.mrp.inherited</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="stock.view_template_property_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<group name="sale_condition" position="inside">
|
||||
<label for="produce_delay" attrs="{'invisible':[('type','=','service')]}"/>
|
||||
<div attrs="{'invisible':[('type','=','service')]}">
|
||||
<field name="produce_delay" class="oe_inline"/> days
|
||||
</div>
|
||||
</group>
|
||||
</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="view_type">form</field>
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
<field name="context">{}</field>
|
||||
</record>
|
||||
<!-- BOM menus -->
|
||||
|
||||
<menuitem
|
||||
action="mrp_bom_form_action"
|
||||
id="menu_mrp_bom_form_action"
|
||||
parent="menu_mrp_bom"
|
||||
sequence="99"/>
|
||||
<menuitem name="Products"
|
||||
id="menu_mrp_product_form"
|
||||
action="product_template_action"
|
||||
parent="menu_mrp_bom"/>
|
||||
|
||||
<record id="action2" model="ir.actions.act_window">
|
||||
<field name="name">Bill of Materials Structure</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.bom.line</field>
|
||||
<field name="domain">[('bom_id', 'in', active_ids)]</field>
|
||||
<field name="view_type">tree</field>
|
||||
<field name="view_id" ref="mrp_bom_tree_view"/>
|
||||
<field name="view_id" ref="mrp_bom_line_tree_view"/>
|
||||
<field name="view_type">tree</field>
|
||||
</record>
|
||||
<record id="ir_BOM_structure" model="ir.values">
|
||||
@@ -599,114 +575,7 @@
|
||||
<field eval="'ir.actions.act_window,'+str(action2)" name="value"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Production Management
|
||||
-->
|
||||
<record id="mrp_production_tree_view" model="ir.ui.view">
|
||||
<field name="name">mrp.production.tree</field>
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree decoration-bf="message_unread==True" decoration-info="state in ('draft','confirmed')" decoration-danger="date_planned<current_date and state not in ('done','cancel')" decoration-muted="state in ('done','cancel')" string="Manufacturing Orders">
|
||||
<field name="message_unread" invisible="1"/>
|
||||
<field name="name"/>
|
||||
<field name="date_planned"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty" sum="Total Qty"/>
|
||||
<field name="product_uom" options="{'no_open':True,'no_create':True}" groups="product.group_uom"/>
|
||||
<field name="routing_id" groups="mrp.group_mrp_routings"/>
|
||||
<field name="hour_total" sum="Total Hours"/>
|
||||
<field name="cycle_total" sum="Total Cycles"/>
|
||||
<field name="origin"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="mrp_production_kanban_view">
|
||||
<field name="name">mrp.production.kanban</field>
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban class="o_kanban_mobile">
|
||||
<field name="name"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom" options="{'no_open':True,'no_create':True}"/>
|
||||
<field name="date_planned"/>
|
||||
<field name="state"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div t-attf-class="oe_kanban_card oe_kanban_global_click">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<strong><span><t t-esc="record.product_id.value"/></span></strong>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<strong><span class="pull-right text-right"><t t-esc="record.product_qty.value"/> <t t-esc="record.product_uom.value"/></span></strong>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 text-muted">
|
||||
<span><t t-esc="record.name.value"/> <t t-esc="record.date_planned.value and record.date_planned.value.split(' ')[0] or False"/></span>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<span t-attf-class="pull-right text-right label #{['draft', 'cancel'].indexOf(record.state.raw_value) > -1 ? 'label-default' : ['none'].indexOf(record.state.raw_value) > -1 ? 'label-danger' : ['confirmed'].indexOf(record.state.raw_value) > -1 ? 'label-warning' : ['done'].indexOf(record.state.raw_value) > -1 ? 'label-success' : 'label-primary'}"><t t-esc="record.state.value"/></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_production_calendar" model="ir.ui.view">
|
||||
<field name="name">mrp.production.calendar</field>
|
||||
<field name="model">mrp.production</field>
|
||||
<field eval="2" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<calendar color="routing_id" date_start="date_planned" string="Manufacturing Orders">
|
||||
<field name="name"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty"/>
|
||||
</calendar>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="view_production_gantt" model="ir.ui.view">
|
||||
<field name="name">mrp.production.gantt</field>
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="arch" type="xml">
|
||||
<gantt date_stop="date_finished" date_start="date_start" progress="progress" string="Productions" default_group_by="routing_id">
|
||||
</gantt>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="view_production_pivot">
|
||||
<field name="name">mrp.production.pivot</field>
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="arch" type="xml">
|
||||
<pivot string="Manufacturing Orders">
|
||||
<field name="date_planned" type="row"/>
|
||||
<field name="hour_total" type="measure"/>
|
||||
<field name="cycle_total" type="measure"/>
|
||||
</pivot>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_production_graph">
|
||||
<field name="name">mrp.production.graph</field>
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Manufacturing Orders">
|
||||
<field name="date_planned"/>
|
||||
<field name="hour_total" type="measure"/>
|
||||
<field name="cycle_total" type="measure"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Production Order -->
|
||||
<record id="mrp_production_form_view" model="ir.ui.view">
|
||||
<field name="name">mrp.production.form</field>
|
||||
<field name="model">mrp.production</field>
|
||||
@@ -880,7 +749,103 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_production_tree_view" model="ir.ui.view">
|
||||
<field name="name">mrp.production.tree</field>
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree decoration-bf="message_unread==True" decoration-info="state in ('draft','confirmed')" decoration-danger="date_planned<current_date and state not in ('done','cancel')" decoration-muted="state in ('done','cancel')" string="Manufacturing Orders">
|
||||
<field name="message_unread" invisible="1"/>
|
||||
<field name="name"/>
|
||||
<field name="date_planned"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty" sum="Total Qty"/>
|
||||
<field name="product_uom" options="{'no_open':True,'no_create':True}" groups="product.group_uom"/>
|
||||
<field name="routing_id" groups="mrp.group_mrp_routings"/>
|
||||
<field name="hour_total" sum="Total Hours"/>
|
||||
<field name="cycle_total" sum="Total Cycles"/>
|
||||
<field name="origin"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="mrp_production_kanban_view" model="ir.ui.view">
|
||||
<field name="name">mrp.production.kanban</field>
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban class="o_kanban_mobile">
|
||||
<field name="name"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom" options="{'no_open':True,'no_create':True}"/>
|
||||
<field name="date_planned"/>
|
||||
<field name="state"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div t-attf-class="oe_kanban_card oe_kanban_global_click">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<strong><span><t t-esc="record.product_id.value"/></span></strong>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<strong><span class="pull-right text-right"><t t-esc="record.product_qty.value"/> <t t-esc="record.product_uom.value"/></span></strong>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 text-muted">
|
||||
<span><t t-esc="record.name.value"/> <t t-esc="record.date_planned.value and record.date_planned.value.split(' ')[0] or False"/></span>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<span t-attf-class="pull-right text-right label #{['draft', 'cancel'].indexOf(record.state.raw_value) > -1 ? 'label-default' : ['none'].indexOf(record.state.raw_value) > -1 ? 'label-danger' : ['confirmed'].indexOf(record.state.raw_value) > -1 ? 'label-warning' : ['done'].indexOf(record.state.raw_value) > -1 ? 'label-success' : 'label-primary'}"><t t-esc="record.state.value"/></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_production_calendar" model="ir.ui.view">
|
||||
<field name="name">mrp.production.calendar</field>
|
||||
<field name="model">mrp.production</field>
|
||||
<field eval="2" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<calendar color="routing_id" date_start="date_planned" string="Manufacturing Orders">
|
||||
<field name="name"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty"/>
|
||||
</calendar>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_production_gantt" model="ir.ui.view">
|
||||
<field name="name">mrp.production.gantt</field>
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="arch" type="xml">
|
||||
<gantt date_stop="date_finished" date_start="date_start" progress="progress" string="Productions" default_group_by="routing_id">
|
||||
</gantt>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_production_pivot" model="ir.ui.view">
|
||||
<field name="name">mrp.production.pivot</field>
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="arch" type="xml">
|
||||
<pivot string="Manufacturing Orders">
|
||||
<field name="date_planned" type="row"/>
|
||||
<field name="hour_total" type="measure"/>
|
||||
<field name="cycle_total" type="measure"/>
|
||||
</pivot>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_production_graph" model="ir.ui.view">
|
||||
<field name="name">mrp.production.graph</field>
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Manufacturing Orders">
|
||||
<field name="date_planned"/>
|
||||
<field name="hour_total" type="measure"/>
|
||||
<field name="cycle_total" type="measure"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_mrp_production_filter" model="ir.ui.view">
|
||||
<field name="name">mrp.production.select</field>
|
||||
<field name="model">mrp.production</field>
|
||||
@@ -908,7 +873,6 @@
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_production_action" model="ir.actions.act_window">
|
||||
<field name="name">Manufacturing Orders</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
@@ -920,7 +884,7 @@
|
||||
<field name="context">{}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Click to create a manufacturing order.
|
||||
Click to create a manufacturing order.
|
||||
</p><p>
|
||||
A manufacturing order, based on a bill of materials, will
|
||||
consume raw materials and produce finished products.
|
||||
@@ -931,8 +895,10 @@
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<menuitem action="mrp_production_action" id="menu_mrp_production_action"
|
||||
parent="menu_mrp_manufacturing" sequence="1"/>
|
||||
<menuitem action="mrp_production_action"
|
||||
id="menu_mrp_production_action"
|
||||
parent="menu_mrp_manufacturing"
|
||||
sequence="1"/>
|
||||
|
||||
<record id="mrp_production_action_planning" model="ir.actions.act_window">
|
||||
<field name="name">Manufacturing Orders</field>
|
||||
@@ -943,7 +909,7 @@
|
||||
<field name="domain">[('state','in',('ready','confirmed','in_production'))]</field>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Click to start a new manufacturing order.
|
||||
Click to start a new manufacturing order.
|
||||
</p><p>
|
||||
A manufacturing order, based on a bill of materials, will
|
||||
consume raw materials and produce finished products.
|
||||
@@ -954,40 +920,11 @@
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<menuitem action="mrp.mrp_production_action_planning"
|
||||
id="menu_mrp_production_order_action" name="Order Planning"
|
||||
parent="menu_mrp_planning" sequence="1"/>
|
||||
|
||||
<record id="mrp_production_action2" model="ir.actions.act_window">
|
||||
<field name="name">Manufacturing Orders To Start</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.production</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,calendar,graph,gantt</field>
|
||||
<field name="domain">[('state','=','ready')]</field>
|
||||
<field name="filter" eval="True"/>
|
||||
<field name="search_view_id" ref="view_mrp_production_filter"/>
|
||||
</record>
|
||||
|
||||
<record id="mrp_production_action3" model="ir.actions.act_window">
|
||||
<field name="name">Manufacturing Orders in Progress</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.production</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,calendar,graph,gantt</field>
|
||||
<field name="domain">[('state','=','in_production')]</field>
|
||||
<field name="filter" eval="True"/>
|
||||
<field name="search_view_id" ref="view_mrp_production_filter"/>
|
||||
</record>
|
||||
|
||||
<record id="mrp_production_action4" model="ir.actions.act_window">
|
||||
<field name="name">Manufacturing Orders Waiting Products</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.production</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,calendar,graph,gantt</field>
|
||||
<field name="domain">[('state','=','confirmed')]</field>
|
||||
<field name="filter" eval="True"/>
|
||||
<field name="search_view_id" ref="view_mrp_production_filter"/>
|
||||
</record>
|
||||
|
||||
<!-- Production Order Line -->
|
||||
<record id="mrp_production_product_form_view" model="ir.ui.view">
|
||||
<field name="name">mrp.production.product.line.form</field>
|
||||
<field name="model">mrp.production.product.line</field>
|
||||
@@ -1018,10 +955,7 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Procurements
|
||||
-->
|
||||
|
||||
<!-- Procurements -->
|
||||
<record id="view_procurement_form_inherit" model="ir.ui.view">
|
||||
<field name="name">procurement.order.form.inherit</field>
|
||||
<field name="model">procurement.order</field>
|
||||
@@ -1041,62 +975,50 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Menu for Resource for MRP-->
|
||||
|
||||
<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="res_model">mrp.workcenter</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="mrp_workcenter_tree_view"/>
|
||||
<field name="search_view_id" ref="view_mrp_workcenter_search"/>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Click to add a work center.
|
||||
</p><p>
|
||||
Work Centers allow you to create and manage manufacturing
|
||||
units. They consist of workers and/or machines, which are
|
||||
considered as units for task assignation as well as capacity
|
||||
and planning forecast.
|
||||
</p>
|
||||
<!-- Product Template -->
|
||||
<record id="view_mrp_product_template_form_inherited" model="ir.ui.view">
|
||||
<field name="name">product.form.mrp.inherited</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="stock.view_template_property_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<group name="sale_condition" position="inside">
|
||||
<label for="produce_delay" attrs="{'invisible':[('type','=','service')]}"/>
|
||||
<div attrs="{'invisible':[('type','=','service')]}">
|
||||
<field name="produce_delay" class="oe_inline"/> days
|
||||
</div>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
<record id="product_template_search_view_procurment" model="ir.ui.view">
|
||||
<field name="name">product.template.search.bom</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="product.product_template_search_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//filter[@name='consumable']" position="after">
|
||||
<separator/>
|
||||
<filter string="Components" name="components" icon="terp-accessories-archiver" domain="[('bom_ids','not in',[])]"/>
|
||||
</xpath>
|
||||
</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="view_type">form</field>
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
<field name="context">{}</field>
|
||||
</record>
|
||||
<menuitem id="menu_mrp_product_form"
|
||||
name="Products"
|
||||
action="product_template_action"
|
||||
parent="menu_mrp_bom"/>
|
||||
|
||||
<menuitem id="menu_pm_resources_config" name="Resources" parent="menu_mrp_configuration" sequence="3"/>
|
||||
<menuitem action="mrp_workcenter_action" id="menu_view_resource_search_mrp" groups="mrp.group_mrp_routings" parent="mrp.menu_mrp_configuration_manufacturing" sequence="25"/>
|
||||
<menuitem action="resource.action_resource_calendar_form" id="menu_view_resource_calendar_search_mrp" parent="menu_pm_resources_config" sequence="1" groups="base.group_no_one"/>
|
||||
<menuitem action="resource.action_resource_calendar_leave_tree" id="menu_view_resource_calendar_leaves_search_mrp" parent="menu_pm_resources_config" sequence="1" groups="base.group_no_one"/>
|
||||
|
||||
<!-- Planning -->
|
||||
|
||||
<menuitem id="menu_mrp_planning" name="Planning"
|
||||
parent="base.menu_mrp_root" sequence="2"/>
|
||||
<menuitem action="mrp.mrp_production_action_planning"
|
||||
id="menu_mrp_production_order_action" name="Order Planning"
|
||||
parent="menu_mrp_planning" sequence="1"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="template_open_bom">
|
||||
<record id="template_open_bom" model="ir.actions.act_window">
|
||||
<field name="context">{'default_product_tmpl_id': active_id, 'search_default_product_tmpl_id': active_id}</field>
|
||||
<field name="name">Bill of Materials</field>
|
||||
<field name="res_model">mrp.bom</field>
|
||||
<field name="view_type">form</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="product_open_bom">
|
||||
<field name="context">{'default_product_id': active_id, 'search_default_product_id': active_id}</field>
|
||||
<field name="name">Bill of Materials</field>
|
||||
<field name="res_model">mrp.bom</field>
|
||||
<field name="domain">[]</field> <!-- Force empty -->
|
||||
<field name="view_type">form</field>
|
||||
</record>
|
||||
|
||||
<record id="act_product_mrp_production" model="ir.actions.act_window">
|
||||
<field name="context">{'search_default_product_id': [active_id]}</field>
|
||||
<field name="name">Manufacturing Orders</field>
|
||||
<field name="res_model">mrp.production</field>
|
||||
<field name="view_id" ref="mrp_production_tree_view"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="product_template_form_view_bom_button">
|
||||
<record id="product_template_form_view_bom_button" model="ir.ui.view">
|
||||
<field name="name">product.template.procurement</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="product.product_template_only_form_view"/>
|
||||
@@ -1107,7 +1029,7 @@
|
||||
attrs="{'invisible':[('type', '=', 'service')]}" icon="fa-flask">
|
||||
<field string="Bill of Materials" name="bom_count" widget="statinfo" />
|
||||
</button>
|
||||
<button class="oe_stat_button" name="action_view_mos" type="object"
|
||||
<button class="oe_stat_button" name="action_view_mos" type="object"
|
||||
attrs="{'invisible':[('type', '=', 'service')]}" icon="fa-list-alt">
|
||||
<field string="Manufacturing" name="mo_count" widget="statinfo" />
|
||||
</button>
|
||||
@@ -1115,18 +1037,32 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="product_product_form_view_bom_button">
|
||||
<!-- Product Product -->
|
||||
<record id="product_open_bom" model="ir.actions.act_window">
|
||||
<field name="context">{'default_product_id': active_id, 'search_default_product_id': active_id}</field>
|
||||
<field name="name">Bill of Materials</field>
|
||||
<field name="res_model">mrp.bom</field>
|
||||
<field name="domain">[]</field> <!-- Force empty -->
|
||||
<field name="view_type">form</field>
|
||||
</record>
|
||||
<record id="act_product_mrp_production" model="ir.actions.act_window">
|
||||
<field name="context">{'search_default_product_id': [active_id]}</field>
|
||||
<field name="name">Manufacturing Orders</field>
|
||||
<field name="res_model">mrp.production</field>
|
||||
<field name="view_id" ref="mrp_production_tree_view"/>
|
||||
</record>
|
||||
<record id="product_product_form_view_bom_button" model="ir.ui.view">
|
||||
<field name="name">product.product.procurement</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
||||
<field name="groups_id" eval="[(4, ref('mrp.group_mrp_user'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<div name="button_box" position="inside">
|
||||
<button class="oe_stat_button" name="action_view_bom" type="object"
|
||||
<button class="oe_stat_button" name="action_view_bom" type="object"
|
||||
attrs="{'invisible':[('type', '=', 'service')]}" icon="fa-flask">
|
||||
<field string="Bill of Materials" name="bom_count" widget="statinfo" />
|
||||
</button>
|
||||
<button class="oe_stat_button" name="%(act_product_mrp_production)d" type="action"
|
||||
<button class="oe_stat_button" name="%(act_product_mrp_production)d" type="action"
|
||||
attrs="{'invisible':[('type', '=', 'service')]}" icon="fa-list-alt">
|
||||
<field string="Manufacturing" name="mo_count" widget="statinfo" />
|
||||
</button>
|
||||
@@ -1134,6 +1070,7 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Warehouse -->
|
||||
<record id="view_warehouse_inherited" model="ir.ui.view">
|
||||
<field name="name">Stock Warehouse Inherited</field>
|
||||
<field name="model">stock.warehouse</field>
|
||||
@@ -1144,5 +1081,6 @@
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
Reference in New Issue
Block a user