1085 lines
60 KiB
XML
1085 lines
60 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<openerp>
|
|
<data>
|
|
|
|
<!-- Top menu item -->
|
|
<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 id="menu_mrp_manufacturing"
|
|
name="Manufacturing"
|
|
parent="base.menu_mrp_root"
|
|
sequence="1"/>
|
|
|
|
<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"/>
|
|
|
|
<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>
|
|
<field name="arch" type="xml">
|
|
<form string="Properties categories">
|
|
<group>
|
|
<field name="name"/>
|
|
</group>
|
|
<separator string="Description"/>
|
|
<field name="description" nolabel="1"/>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
<record id="mrp_property_group_action" model="ir.actions.act_window">
|
|
<field name="name">Property Groups</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="res_model">mrp.property.group</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="help" type="html">
|
|
<p class="oe_view_nocontent_create">
|
|
Click to create a group of properties.
|
|
</p><p>
|
|
Define specific property groups that can be assigned to your
|
|
bill of materials and sales orders. Properties allows Odoo
|
|
to automatically select the right bill of materials according
|
|
to properties selected in the sales order by salesperson.
|
|
</p><p>
|
|
For instance, in the property group "Warranty", you an have
|
|
two properties: 1 year warranty, 3 years warranty. Depending
|
|
on the propoerties selected in the sales order, Odoo will
|
|
schedule a production using the matching bill of materials.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
<menuitem id="menu_mrp_property_group_action"
|
|
action="mrp_property_group_action"
|
|
parent="menu_mrp_configuration"
|
|
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>
|
|
<field name="arch" type="xml">
|
|
<tree string="Properties">
|
|
<field name="name"/>
|
|
<field name="composition"/>
|
|
<field name="group_id"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
<record id="mrp_property_form_view" model="ir.ui.view">
|
|
<field name="name">mrp.property.form</field>
|
|
<field name="model">mrp.property</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Properties">
|
|
<group col="4">
|
|
<field colspan="4" name="name"/>
|
|
<field name="group_id"/>
|
|
<field name="composition"/>
|
|
</group>
|
|
<separator string="Description"/>
|
|
<field name="description" nolabel="1"/>
|
|
</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>
|
|
<field name="arch" type="xml">
|
|
<search string="Search">
|
|
<field name="name" string="Name"/>
|
|
<field name="composition"/>
|
|
<field name="group_id" />
|
|
<group expand="0" string="Group By">
|
|
<filter string="Property Group" domain="[]" context="{'group_by':'group_id'}"/>
|
|
</group>
|
|
</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>
|
|
<field name="res_model">mrp.property</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="search_view_id" ref="view_mrp_property_search"/>
|
|
<field name="help" type="html">
|
|
<p class="oe_view_nocontent_create">
|
|
Click to create a new property.
|
|
</p><p>
|
|
The Properties in Odoo are used to select the right bill of
|
|
materials for manufacturing a product when you have different
|
|
ways of building the same product. You can assign several
|
|
properties to each bill of materials. When a salesperson
|
|
creates a sales order, they can relate it to several properties
|
|
and Odoo will automatically select the BoM to use according
|
|
the needs.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
<menuitem id="menu_mrp_property_action"
|
|
action="mrp_property_action"
|
|
groups="product.group_mrp_properties"
|
|
parent="menu_mrp_configuration"
|
|
sequence="30"/>
|
|
|
|
<!-- 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>
|
|
<field name="arch" type="xml">
|
|
<tree string="Work Center">
|
|
<field name="code"/>
|
|
<field name="name"/>
|
|
<field name="resource_type"/>
|
|
<field name="company_id" groups="base.group_multi_company"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
<record id="mrp_workcenter_view" model="ir.ui.view">
|
|
<field name="name">mrp.workcenter.form</field>
|
|
<field name="model">mrp.workcenter</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Work Center">
|
|
<group col="4">
|
|
<group>
|
|
<field name="name"/>
|
|
<field name="resource_type"/>
|
|
<field name="calendar_id" widget="selection"/>
|
|
</group>
|
|
<group>
|
|
<field name="code"/>
|
|
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
|
<field name="active"/>
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page string="General Information">
|
|
<group>
|
|
<group string="Capacity Information">
|
|
<field name="time_efficiency"/>
|
|
<field name="capacity_per_cycle"/>
|
|
<field name="time_cycle" widget="float_time"/>
|
|
<field name="time_start" widget="float_time"/>
|
|
<field name="time_stop" widget="float_time"/>
|
|
</group>
|
|
<group string="Costing Information">
|
|
<field name="product_id" on_change="on_change_product_cost(product_id)"/>
|
|
<field name="costs_hour"/>
|
|
<field name="costs_hour_account_id" groups="analytic.group_analytic_accounting"/>
|
|
<field name="costs_cycle"/>
|
|
<field name="costs_cycle_account_id" groups="analytic.group_analytic_accounting"/>
|
|
<field name="costs_general_account_id" attrs="{ 'required':['|',('costs_cycle_account_id', '=', True),('costs_hour_account_id', '=', True)]}" groups="analytic.group_analytic_accounting"/>
|
|
</group>
|
|
</group>
|
|
<separator string="Description"/>
|
|
<field name="note" nolabel="1"/>
|
|
</page>
|
|
</notebook>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
<record id="view_mrp_workcenter_search" model="ir.ui.view">
|
|
<field name="name">mrp.workcenter.search</field>
|
|
<field name="model">mrp.workcenter</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Search for mrp workcenter">
|
|
<field name="name" string="Mrp Workcenter" filter_domain="['|',('name','ilike',self),('code','ilike',self)]"/>
|
|
<field name="resource_type"/>
|
|
<filter string="Inactive" domain="[('active','=',False)]"/>
|
|
<group expand="0" string="Group By...">
|
|
<filter string="Type" domain="[]" context="{'group_by':'resource_type'}"/>
|
|
<filter string="Company" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- 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>
|
|
<field name="arch" type="xml">
|
|
<tree string="Routing Work Centers">
|
|
<field name="sequence" widget="handle"/>
|
|
<field name="name"/>
|
|
<field name="workcenter_id"/>
|
|
<field name="cycle_nbr"/>
|
|
<field name="hour_nbr"/>
|
|
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
|
|
</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>
|
|
<field name="arch" type="xml">
|
|
<form string="Routing Work Centers">
|
|
<sheet>
|
|
<group>
|
|
<group>
|
|
<field name="name"/>
|
|
<field name="workcenter_id"/>
|
|
<field name="sequence" groups="base.group_no_one"/>
|
|
</group><group>
|
|
<field name="cycle_nbr"/>
|
|
<field name="hour_nbr" widget="float_time"/>
|
|
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
|
|
</group>
|
|
</group>
|
|
<label for="note"/>
|
|
<field name="note"/>
|
|
</sheet>
|
|
</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>
|
|
<field name="arch" type="xml">
|
|
<form string="Routing">
|
|
<sheet>
|
|
<group>
|
|
<group>
|
|
<field name="name"/>
|
|
<field name="code"/>
|
|
</group>
|
|
<group>
|
|
<field name="location_id"/>
|
|
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
|
|
<field name="active"/>
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page string="Work Center Operations">
|
|
<field name="workcenter_lines" string="Operation"/>
|
|
</page>
|
|
<page string="Notes">
|
|
<field name="note"/>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
<record id="mrp_routing_tree_view" model="ir.ui.view">
|
|
<field name="name">mrp.routing.tree</field>
|
|
<field name="model">mrp.routing</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Routing">
|
|
<field name="code"/>
|
|
<field name="name"/>
|
|
<field name="location_id"/>
|
|
<field name="company_id" groups="base.group_multi_company"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
<record id="mrp_routing_search_view" model="ir.ui.view">
|
|
<field name="name">mrp.routing.search</field>
|
|
<field name="model">mrp.routing</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Routing">
|
|
<field name="name" string="Routing" filter_domain="['|',('name','ilike',self),('code','ilike',self)]"/>
|
|
<filter string="Inactive" domain="[('active','=',False)]"/>
|
|
<field name="location_id"/>
|
|
<field name="company_id" groups="base.group_multi_company"/>
|
|
<group expand="0" string="Group By...">
|
|
<filter string="Production Location" domain="[]" context="{'group_by':'location_id'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
<record id="mrp_routing_action" model="ir.actions.act_window">
|
|
<field name="name">Routings</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="res_model">mrp.routing</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_id" ref="mrp_routing_tree_view"/>
|
|
<field name="search_view_id" ref="mrp_routing_search_view"/>
|
|
<field name="help" type="html">
|
|
<p class="oe_view_nocontent_create">
|
|
Click to create a new routing.
|
|
</p><p>
|
|
Routings 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 raw materials.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
<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>
|
|
<field name="arch" type="xml">
|
|
<form string="Bill of Material">
|
|
<sheet>
|
|
<group>
|
|
<group>
|
|
<field name="product_tmpl_id" on_change="onchange_product_tmpl_id(product_tmpl_id, product_qty, context)"/>
|
|
<field name="product_id" groups="product.group_product_variant"/>
|
|
<label for="product_qty" string="Quantity"/>
|
|
<div>
|
|
<field name="product_qty" class="oe_inline" on_change="onchange_product_tmpl_id(product_tmpl_id, product_qty, context)"/>
|
|
<field name="product_uom" options="{'no_open':True,'no_create':True}" class="oe_inline" on_change="onchange_uom(product_tmpl_id, product_uom)" groups="product.group_uom"/>
|
|
</div>
|
|
<label for="routing_id" class="oe_inline" groups="mrp.group_mrp_routings"/>
|
|
<div groups="mrp.group_mrp_routings">
|
|
<field name="routing_id" class="oe_inline"/>
|
|
</div>
|
|
</group>
|
|
<group>
|
|
<field name="code"/>
|
|
<field name="type" widget="radio"/>
|
|
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page string="Components">
|
|
<field name="bom_line_ids" widget="one2many_list">
|
|
<tree string="Components" editable="bottom">
|
|
<field name="sequence" widget="handle"/>
|
|
<field name="product_id" on_change="onchange_product_id(product_id, product_qty)"/>
|
|
<field name="product_qty"/>
|
|
<field name="product_uom" options="{'no_open':True,'no_create':True}" on_change="onchange_uom(product_id, product_uom)" groups="product.group_uom"/>
|
|
<field name="product_rounding" groups="mrp.group_rounding_efficiency"/>
|
|
<field name="product_efficiency" groups="mrp.group_rounding_efficiency"/>
|
|
<field name="date_start"/>
|
|
<field name="date_stop"/>
|
|
<field name="attribute_value_ids" widget="many2many_tags" domain="[('product_ids.product_tmpl_id', '=', parent.product_tmpl_id)]" groups="product.group_product_variant"/>
|
|
<field name="property_ids" widget="many2many_tags" groups="product.group_mrp_properties"/>
|
|
</tree>
|
|
</field>
|
|
</page>
|
|
<page string="Properties" groups="base.group_no_one">
|
|
<group>
|
|
<group>
|
|
<field name="position"/>
|
|
<field name="sequence"/>
|
|
<field name="active"/>
|
|
</group>
|
|
<group>
|
|
<field name="date_start"/>
|
|
<field name="date_stop"/>
|
|
<field name="product_rounding"/>
|
|
<field name="product_efficiency"/>
|
|
</group>
|
|
</group>
|
|
<separator string="Properties" groups="product.group_mrp_properties"/>
|
|
<group>
|
|
<group>
|
|
<field name="property_ids" widget="many2many_tags" groups="product.group_mrp_properties"/>
|
|
</group>
|
|
<group/>
|
|
</group>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
<div class="oe_chatter">
|
|
<field name="message_follower_ids" widget="mail_followers"/>
|
|
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
|
|
</div>
|
|
</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="product_tmpl_id"/>
|
|
<field name="code"/>
|
|
<field name="product_id" groups="product.group_product_variant"/>
|
|
<field name="product_qty"/>
|
|
<field name="product_uom" groups="product.group_uom"/>
|
|
</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>
|
|
<field name="arch" type="xml">
|
|
<search string="Search Bill Of Material">
|
|
<field name="code"/>
|
|
<field name="bom_line_ids" string="Components"/>
|
|
<field name="product_tmpl_id" string="Product"/>
|
|
<field name="company_id" groups="base.group_multi_company"/>
|
|
<group expand="0" string="Group By...">
|
|
<filter string="Product" domain="[]" context="{'group_by':'product_tmpl_id'}"/>
|
|
<filter string='Default Unit of Measure' domain="[]" context="{'group_by' : 'product_uom'}"/>
|
|
<filter string="Routings" domain="[]" context="{'group_by':'routing_id'}"/>
|
|
<filter string="Valid From Month" domain="[]" context="{'group_by':'date_start'}" help="Valid From Date by Month"/>
|
|
</group>
|
|
</search>
|
|
</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>
|
|
<field name="res_model">mrp.bom</field>
|
|
<field name="domain">[]</field> <!-- force empty -->
|
|
<field name="view_type">form</field>
|
|
<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.
|
|
</p><p>
|
|
Bills of Materials allow you to define the list of required raw
|
|
materials used to make a finished product; through a manufacturing
|
|
order or a pack of products.
|
|
</p><p>
|
|
Odoo uses these BoMs to automatically propose manufacturing
|
|
orders according to procurement needs.
|
|
</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>
|
|
<field name="arch" type="xml">
|
|
<tree string="Components" editable="top">
|
|
<field name="sequence" widget="handle"/>
|
|
<field name="bom_id"/>
|
|
<field name="product_id" on_change="onchange_product_id(product_id)"/>
|
|
<field name="product_qty"/>
|
|
<field name="product_rounding"/>
|
|
<field name="product_efficiency"/>
|
|
<field name="product_uom" options="{'no_open':True,'no_create':True}" on_change="onchange_uom(product_id, product_uom)" groups="product.group_uom"/>
|
|
<field name="date_start"/>
|
|
<field name="date_stop"/>
|
|
<field name="routing_id"/>
|
|
<field name="attribute_value_ids" widget="many2many_tags" groups="product.group_product_variant"/>
|
|
<field name="property_ids" widget="many2many_tags" groups="product.group_mrp_properties"/>
|
|
</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="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>
|
|
<field name="arch" type="xml">
|
|
<search string="Search Bill Of Material Components">
|
|
<field name="bom_id"/>
|
|
<field name="product_id"/>
|
|
<group expand="0" string="Group By...">
|
|
<filter string="Bill Of Material" domain="[]" context="{'group_by':'bom_id'}"/>
|
|
<filter string="Product" domain="[]" context="{'group_by':'product_id'}"/>
|
|
<filter string='Default Unit of Measure' domain="[]" context="{'group_by' : 'product_uom'}"/>
|
|
<filter string="Routings" domain="[]" context="{'group_by':'routing_id'}"/>
|
|
<filter string=" Valid From Month" domain="[]" context="{'group_by':'date_start'}" help="Valid From Date by Month"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
<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_line_tree_view"/>
|
|
<field name="view_type">tree</field>
|
|
</record>
|
|
<record id="ir_BOM_structure" model="ir.values">
|
|
<field eval="'client_action_multi'" name="key2"/>
|
|
<field eval="'mrp.bom'" name="model"/>
|
|
<field name="name">Bill of Materials Structure</field>
|
|
<field eval="'ir.actions.act_window,'+str(action2)" name="value"/>
|
|
</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>
|
|
<field name="arch" type="xml">
|
|
<form string="Manufacturing Orders">
|
|
<header>
|
|
<button name="button_confirm" states="draft" string="Confirm Production" class="oe_highlight"/>
|
|
<button name="%(act_mrp_product_produce)d" states="ready,in_production" string="Produce" type="action" class="oe_highlight"/>
|
|
<button name="action_assign" states="confirmed,picking_except" string="Reserve" type="object" class="oe_highlight"/>
|
|
<button name="force_production" states="confirmed" string="Force Reservation" type="object"/>
|
|
<button name="button_produce" states="ready" string="Mark as Started"/>
|
|
<button name="button_cancel" states="draft,ready,in_production" string="Cancel Production"/>
|
|
<button name="action_cancel" type="object" states="confirmed" string="Cancel Production"/>
|
|
<field name="state" widget="statusbar" statusbar_visible="draft,ready,in_production,done" statusbar_colors='{"confirmed":"blue"}'/>
|
|
</header>
|
|
<sheet>
|
|
<div class="oe_title">
|
|
<label for="name" class="oe_edit_only"/>
|
|
<h1><field name="name" placeholder="Manufacturing Reference"/></h1>
|
|
</div>
|
|
<group>
|
|
<group>
|
|
<field name="product_id" on_change="product_id_change(product_id, product_qty)" domain="[('bom_ids','!=',False),('bom_ids.type','!=','phantom')]" context='{"default_type": "product"}'/>
|
|
<field name="product_tmpl_id" invisible="1"/>
|
|
<label for="product_qty"/>
|
|
<div class="o_row">
|
|
<field name="product_qty" on_change="product_id_change(product_id, product_qty)"/>
|
|
<field name="product_uom" options="{'no_open':True,'no_create':True}" groups="product.group_uom"/>
|
|
<button type="action"
|
|
name="%(mrp.action_change_production_qty)d"
|
|
string="Update" states="confirmed" class="oe_edit_only oe_link"/>
|
|
</div>
|
|
<field name="date_planned"/>
|
|
</group>
|
|
<group>
|
|
<field name="bom_id"
|
|
domain="['|',
|
|
('product_id','=',product_id),
|
|
'&',
|
|
('product_tmpl_id.product_variant_ids','=',product_id),
|
|
('product_id','=',False)]"
|
|
context="{'default_product_id': product_id, 'default_product_tmpl_id': product_tmpl_id}" on_change="bom_id_change(bom_id)" required="1"/>
|
|
<field name="routing_id" groups="mrp.group_mrp_routings"/>
|
|
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'mrp.group_mrp_user']}"/>
|
|
<field name="origin"/>
|
|
</group>
|
|
<group groups="stock.group_locations">
|
|
<field name="location_src_id" domain="[('usage','=','internal')]" on_change="location_id_change(location_src_id,location_dest_id)"/>
|
|
<field name="location_dest_id" domain="[('usage','=','internal')]"/>
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page string="Consumed Products">
|
|
<group>
|
|
<group string="Products to Consume">
|
|
<field name="move_lines" nolabel="1" options="{'reload_on_button': true}">
|
|
<tree decoration-info="state == 'draft'" decoration-muted="state in ('cancel','done')" decoration-danger="state in ('confirmed','waiting')" string="Products to Consume">
|
|
<field name="product_id"/>
|
|
<field name="product_uom_qty" string="Quantity"/>
|
|
<field name="product_uom" options="{'no_open':True,'no_create':True}" string="Unit of Measure" groups="product.group_uom"/>
|
|
<field name="state" invisible="1"/>
|
|
<button name="%(mrp.move_consume)d"
|
|
string="Consume Products" type="action"
|
|
icon="gtk-go-forward" context="{'consume': True}"
|
|
states="assigned"
|
|
/>
|
|
<button name="%(stock.move_scrap)d"
|
|
string="Scrap Products" type="action"
|
|
icon="terp-gtk-jump-to-ltr" context="{'scrap': True}"
|
|
states="draft,waiting,confirmed,assigned"/>
|
|
</tree>
|
|
</field>
|
|
</group>
|
|
<group string="Consumed Products">
|
|
<field name="move_lines2" nolabel="1" options="{'reload_on_button': true}">
|
|
<tree decoration-danger="scrapped==True" decoration-info="state == 'draft'" decoration-muted="state == 'cancel'" string="Consumed Products" editable="bottom">
|
|
<field name="product_id" readonly="1"/>
|
|
<field name="restrict_lot_id" context="{'product_id': product_id}" groups="stock.group_production_lot"/>
|
|
<field name="product_uom_qty" readonly="1"/>
|
|
<field name="product_uom" options="{'no_open':True,'no_create':True}" readonly="1" string="Unit of Measure" groups="product.group_uom"/>
|
|
<field name="state" invisible="1"/>
|
|
<field name="scrapped" invisible="1"/>
|
|
</tree>
|
|
</field>
|
|
</group>
|
|
</group>
|
|
</page>
|
|
<page string="Finished Products">
|
|
<group>
|
|
<group string="Products to Produce">
|
|
<field name="move_created_ids" nolabel="1" options="{'reload_on_button': true}">
|
|
<tree string="Products to Finish">
|
|
<field name="product_id"/>
|
|
<field name="product_uom_qty"/>
|
|
<field name="product_uom" options="{'no_open':True,'no_create':True}" string="Unit of Measure" groups="product.group_uom"/>
|
|
<field name="state" invisible="1"/>
|
|
</tree>
|
|
</field>
|
|
</group>
|
|
<group string="Produced Products">
|
|
<field name="move_created_ids2" nolabel="1" options="{'reload_on_button': true}">
|
|
<tree decoration-danger="scrapped==True" decoration-info="state == 'draft'" decoration-muted="state == 'cancel'" string="Finished Products">
|
|
<field name="product_id" readonly="1"/>
|
|
<field name="product_uom_qty" readonly="1"/>
|
|
<field name="restrict_lot_id" groups="stock.group_production_lot"/>
|
|
<field name="product_uom" options="{'no_open':True,'no_create':True}" readonly="1" string="Unit of Measure" groups="product.group_uom"/>
|
|
<field name="location_dest_id" readonly="1" string="Destination Loc." widget="selection" groups="stock.group_locations"/>
|
|
<field name="scrapped" invisible="1"/>
|
|
<field name="state" invisible="1"/>
|
|
<button name="%(stock.move_scrap)d"
|
|
string="Scrap Products" type="action" icon="terp-gtk-jump-to-ltr"
|
|
states="done,cancel"/>
|
|
</tree>
|
|
</field>
|
|
</group>
|
|
</group>
|
|
</page>
|
|
<page string="Work Orders" groups="mrp.group_mrp_routings">
|
|
<button name="action_compute" states="draft"
|
|
string="Compute Data" type="object"
|
|
icon="terp-stock_format-scientific"/>
|
|
<field name="workcenter_lines" options="{'reload_on_button': true}">
|
|
<form string="Production Work Centers">
|
|
<group col="4">
|
|
<field colspan="4" name="name"/>
|
|
<field name="workcenter_id"/>
|
|
<field name="sequence"/>
|
|
<field name="cycle"/>
|
|
<field name="hour" widget="float_time"/>
|
|
</group>
|
|
</form>
|
|
<tree string="Production Work Centers">
|
|
<field name="sequence"/>
|
|
<field name="name"/>
|
|
<field name="workcenter_id"/>
|
|
<field name="cycle"/>
|
|
<field name="hour" widget="float_time"/>
|
|
</tree>
|
|
</field>
|
|
</page>
|
|
<page string="Scheduled Products">
|
|
<button name="action_compute" states="draft"
|
|
string="Compute Data" type="object"
|
|
icon="terp-stock_format-scientific"/>
|
|
<field name="product_lines"/>
|
|
</page>
|
|
<page string="Extra Information">
|
|
<group>
|
|
<group>
|
|
<field name="priority"/>
|
|
<field name="date_start" invisible="1"/>
|
|
<field name="date_finished" invisible="1"/>
|
|
</group>
|
|
<group>
|
|
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
|
<field name="move_prod_id" groups="base.group_no_one"/>
|
|
</group>
|
|
</group>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
<div class="oe_chatter">
|
|
<field name="message_follower_ids" widget="mail_followers"/>
|
|
<field name="message_ids" widget="mail_thread"/>
|
|
</div>
|
|
</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_needaction==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_needaction" 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>
|
|
<field name="arch" type="xml">
|
|
<search string="Search Production">
|
|
<field name="name" string="Production" filter_domain="['|',('name','ilike',self),('origin','ilike',self)]"/>
|
|
<filter string="Pending" name="pending" domain="[('state','=','confirmed')]"
|
|
help="Manufacturing Orders which are waiting for raw materials."/>
|
|
<filter string="Ready" name="ready" domain="[('state','=','ready')]"
|
|
help="Manufacturing Orders which are ready to start production."/>
|
|
<filter string="In Production" name="inprogress" domain="[('state','=','in_production')]"
|
|
help="Manufacturing Orders which are currently in production."/>
|
|
<separator/>
|
|
<filter string="Late" domain="['&', ('date_planned','<', current_date), ('state', 'in', ('draft', 'confirmed', 'ready'))]"
|
|
help="Production started late"/>
|
|
<field name="product_tmpl_id"/>
|
|
<field name="product_id"/>
|
|
<field name="routing_id" groups="mrp.group_mrp_routings"/>
|
|
<group expand="0" string="Group By...">
|
|
<filter string="Product" domain="[]" context="{'group_by':'product_id'}"/>
|
|
<filter string="Routing" domain="[]" context="{'group_by':'routing_id'}"/>
|
|
<filter string="Status" domain="[]" context="{'group_by':'state'}"/>
|
|
<filter string="Scheduled Month" domain="[]" context="{'group_by':'date_planned'}" help="Scheduled Date by Month"/>
|
|
</group>
|
|
</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>
|
|
<field name="res_model">mrp.production</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">tree,kanban,form,calendar,pivot,graph,gantt</field>
|
|
<field name="view_id" eval="False"/>
|
|
<field name="search_view_id" ref="view_mrp_production_filter"/>
|
|
<field name="context">{}</field>
|
|
<field name="help" type="html">
|
|
<p class="oe_view_nocontent_create">
|
|
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.
|
|
</p><p>
|
|
Manufacturing orders are usually proposed automatically based
|
|
on customer requirements or automated rules like the minimum
|
|
stock rule.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
<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>
|
|
<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">calendar,tree,form,pivot,graph</field>
|
|
<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.
|
|
</p><p>
|
|
A manufacturing order, based on a bill of materials, will
|
|
consume raw materials and produce finished products.
|
|
</p><p>
|
|
Manufacturing orders are usually proposed automatically based
|
|
on customer requirements or automated rules like the minimum
|
|
stock rule.
|
|
</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"/>
|
|
|
|
<!-- 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>
|
|
<field name="arch" type="xml">
|
|
<form string="Scheduled Products">
|
|
<group col="4">
|
|
<field name="name"/>
|
|
<field name="product_id"/>
|
|
<field name="product_qty"/>
|
|
<field name="product_uom" options="{'no_open':True,'no_create':True}" groups="product.group_uom"/>
|
|
</group>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
<record id="mrp_production_product_tree_view" model="ir.ui.view">
|
|
<field name="name">mrp.production.product.line.tree</field>
|
|
<field name="model">mrp.production.product.line</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Scheduled Products">
|
|
<field name="product_id"/>
|
|
<field name="product_qty"/>
|
|
<field name="product_uom" options="{'no_open':True,'no_create':True}" groups="product.group_uom"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Procurements -->
|
|
<record id="view_procurement_rule_form_stock_inherit_mrp" model="ir.ui.view">
|
|
<field name="name">procurement.rule.form.stock.inherit.mrp</field>
|
|
<field name="model">procurement.rule</field>
|
|
<field name="inherit_id" ref="stock.view_procurement_rule_form_stock_inherit"/>
|
|
<field name="arch" type="xml">
|
|
<field name="location_src_id" position="attributes">
|
|
<attribute name="attrs">{'required': [('action', '=', 'move')], 'invisible': [('action', 'not in', ['move', 'manufacture'])]}</attribute>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_procurement_form_inherit" model="ir.ui.view">
|
|
<field name="name">procurement.order.form.inherit</field>
|
|
<field name="model">procurement.order</field>
|
|
<field name="inherit_id" ref="procurement.procurement_form_view"/>
|
|
<field name="arch" type="xml">
|
|
<data>
|
|
<field name="origin" position="before">
|
|
<field name="bom_id" domain="[('product_id','=',product_id)]"/>
|
|
<field name="production_id" attrs="{'invisible': [('production_id','=',False)]}"/>
|
|
</field>
|
|
<field name="origin" position="after">
|
|
<field name="property_ids" widget="many2many_tags" groups="product.group_mrp_properties"/>
|
|
</field>
|
|
</data>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- 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" 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"/>
|
|
|
|
<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 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"/>
|
|
<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="%(template_open_bom)d" type="action"
|
|
attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}" 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"
|
|
attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}" icon="fa-list-alt">
|
|
<field string="Manufacturing" name="mo_count" widget="statinfo" />
|
|
</button>
|
|
</div>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- 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"
|
|
attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}" 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"
|
|
attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}" icon="fa-list-alt">
|
|
<field string="Manufacturing" name="mo_count" widget="statinfo" />
|
|
</button>
|
|
</div>
|
|
</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>
|
|
<field name="inherit_id" ref="stock.view_warehouse"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='default_resupply_wh_id']" position="before">
|
|
<field name="manufacture_to_resupply" />
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
</data>
|
|
</openerp>
|