[IMP] mrp: usability onboarding

Various views and labelling changes
This commit is contained in:
Bhavik Bagdiya
2015-03-09 21:14:28 +01:00
committed by Richard Mathot
parent ff1d3849af
commit fede8a8cfb
8 changed files with 59 additions and 49 deletions
+4 -4
View File
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
# Odoo, Open Source Management Solution
# Copyright (C) 2004-TODAY Odoo S.A. (<https://www.odoo.com/>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ -27,7 +27,7 @@
'website': 'https://www.odoo.com/page/manufacturing',
'category': 'Manufacturing',
'sequence': 18,
'summary': 'Manufacturing Orders, Bill of Materials, Routing',
'summary': 'Manufacturing Orders, Bill of Materials, Work Order Operations',
'depends': ['product', 'procurement', 'stock_account', 'resource', 'report'],
'description': """
Manage the Manufacturing process in OpenERP
@@ -42,7 +42,7 @@ Key Features
* Make to Stock/Make to Order
* Multi-level bill of materials, no limit
* Multi-level routing, no limit
* Routing and work center integrated with analytic accounting
* Work Order Operations and work center integrated with analytic accounting
* Periodical scheduler computation
* Allows to browse bills of materials in a complete structure that includes child and phantom bills of materials
+17 -15
View File
@@ -101,7 +101,7 @@ class mrp_routing(osv.osv):
For specifying the routings of Work Centers.
"""
_name = 'mrp.routing'
_description = 'Routing'
_description = 'Work Order Operations'
_columns = {
'name': fields.char('Name', required=True),
'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the routing without removing it."),
@@ -136,9 +136,9 @@ class mrp_routing_workcenter(osv.osv):
'cycle_nbr': fields.float('Number of Cycles', required=True,
help="Number of iterations this work center has to do in the specified operation of the routing."),
'hour_nbr': fields.float('Number of Hours', required=True, help="Time in hours for this Work Center to achieve the operation of the specified routing."),
'routing_id': fields.many2one('mrp.routing', 'Parent Routing', select=True, ondelete='cascade',
help="Routing indicates all the Work Centers used, for how long and/or cycles." \
"If Routing is indicated then,the third tab of a production order (Work Centers) will be automatically pre-completed."),
'routing_id': fields.many2one('mrp.routing', 'Parent Work Order Operations', select=True, ondelete='cascade',
help="Work Order Operations indicates all the Work Centers used, for how long and/or cycles." \
"If Work Order Operations is indicated then,the third tab of a production order (Work Centers) will be automatically pre-completed."),
'note': fields.text('Description'),
'company_id': fields.related('routing_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
}
@@ -172,7 +172,7 @@ class mrp_bom(osv.osv):
'date_start': fields.date('Valid From', help="Validity of this BoM. Keep empty if it's always valid."),
'date_stop': fields.date('Valid Until', help="Validity of this BoM. Keep empty if it's always valid."),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of bills of material."),
'routing_id': fields.many2one('mrp.routing', 'Routing', help="The list of operations (list of work centers) to produce the finished product. "\
'routing_id': fields.many2one('mrp.routing', 'Work Order Operations', help="The list of operations (list of work centers) to produce the finished product. "\
"The routing is mainly used to compute work center costs during operations and to plan future loads on work centers based on production planning."),
'product_rounding': fields.float('Product Rounding', help="Rounding applied on the product quantity."),
'product_efficiency': fields.float('Manufacturing Efficiency', required=True, help="A factor of 0.9 means a loss of 10% during the production process."),
@@ -387,7 +387,7 @@ class mrp_bom_line(osv.osv):
'date_start': fields.date('Valid From', help="Validity of component. Keep empty if it's always valid."),
'date_stop': fields.date('Valid Until', help="Validity of component. Keep empty if it's always valid."),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying."),
'routing_id': fields.many2one('mrp.routing', 'Routing', help="The list of operations (list of work centers) to produce the finished product. The routing is mainly used to compute work center costs during operations and to plan future loads on work centers based on production planning."),
'routing_id': fields.many2one('mrp.routing', 'Work Order Operations', help="The list of operations (list of work centers) to produce the finished product. The routing is mainly used to compute work center costs during operations and to plan future loads on work centers based on production planning."),
'product_rounding': fields.float('Product Rounding', help="Rounding applied on the product quantity."),
'product_efficiency': fields.float('Manufacturing Efficiency', required=True, help="A factor of 0.9 means a loss of 10% within the production process."),
'property_ids': fields.many2many('mrp.property', string='Properties'), #Not used
@@ -546,7 +546,7 @@ class mrp_production(osv.osv):
'date_finished': fields.datetime('End Date', select=True, readonly=True, copy=False),
'bom_id': fields.many2one('mrp.bom', 'Bill of Material', readonly=True, states={'draft': [('readonly', False)]},
help="Bill of Materials allow you to define the list of required raw materials to make a finished product."),
'routing_id': fields.many2one('mrp.routing', string='Routing', on_delete='set null', readonly=True, states={'draft': [('readonly', False)]},
'routing_id': fields.many2one('mrp.routing', string='Work Order Operations', on_delete='set null', readonly=True, states={'draft': [('readonly', False)]},
help="The list of operations (list of work centers) to produce the finished product. The routing is mainly used to compute work center costs during operations and to plan future loads on work centers based on production plannification."),
'move_prod_id': fields.many2one('stock.move', 'Product Move', readonly=True, copy=False),
'move_lines': fields.one2many('stock.move', 'raw_material_production_id', 'Products to Consume',
@@ -566,17 +566,18 @@ class mrp_production(osv.osv):
('ready', 'Ready to Produce'), ('in_production', 'Production Started'), ('done', 'Done')],
string='Status', readonly=True,
track_visibility='onchange', copy=False,
help="When the production order is created the status is set to 'Draft'.\n\
If the order is confirmed the status is set to 'Waiting Goods'.\n\
If any exceptions are there, the status is set to 'Picking Exception'.\n\
If the stock is available then the status is set to 'Ready to Produce'.\n\
When the production gets started then the status is set to 'In Production'.\n\
When the production is over, the status is set to 'Done'."),
help="When the production order is created the status is set to 'Draft'.\n"
"If the order is confirmed the status is set to 'Waiting Goods.\n"
"If any exceptions are there, the status is set to 'Picking Exception.\n"
"If the stock is available then the status is set to 'Ready to Produce.\n"
"When the production gets started then the status is set to 'In Production.\n"
"When the production is over, the status is set to 'Done'."),
'hour_total': fields.function(_production_calc, type='float', string='Total Hours', multi='workorder', store=True),
'cycle_total': fields.function(_production_calc, type='float', string='Total Cycles', multi='workorder', store=True),
'user_id': fields.many2one('res.users', 'Responsible'),
'company_id': fields.many2one('res.company', 'Company', required=True),
'ready_production': fields.function(_moves_assigned, type='boolean', string="Ready for production", store={'stock.move': (_mrp_from_move, ['state'], 10)}),
'product_tmpl_id': fields.related('product_id', 'product_tmpl_id', type='many2one', relation='product.template', string='Product'),
}
_defaults = {
@@ -645,7 +646,8 @@ class mrp_production(osv.osv):
'bom_id': False,
'routing_id': False,
'product_uos_qty': 0,
'product_uos': False
'product_uos': False,
'product_tmpl_id': False
}}
bom_obj = self.pool.get('mrp.bom')
product = self.pool.get('product.product').browse(cr, uid, product_id, context=context)
@@ -655,7 +657,7 @@ class mrp_production(osv.osv):
bom_point = bom_obj.browse(cr, uid, bom_id, context=context)
routing_id = bom_point.routing_id.id or False
product_uom_id = product.uom_id and product.uom_id.id or False
result['value'] = {'product_uos_qty': 0, 'product_uos': False, 'product_uom': product_uom_id, 'bom_id': bom_id, 'routing_id': routing_id}
result['value'] = {'product_uos_qty': 0, 'product_uos': False, 'product_uom': product_uom_id, 'bom_id': bom_id, 'routing_id': routing_id, 'product_tmpl_id': product.product_tmpl_id}
if product.uos_id.id:
result['value']['product_uos_qty'] = product_qty * product.uos_coeff
result['value']['product_uos'] = product.uos_id.id
+24 -17
View File
@@ -282,7 +282,7 @@
<field name="name">mrp.routing.form</field>
<field name="model">mrp.routing</field>
<field name="arch" type="xml">
<form string="Routing">
<form string="Work Order Operations">
<group col="4">
<group>
<field name="name"/>
@@ -309,7 +309,7 @@
<field name="name">mrp.routing.tree</field>
<field name="model">mrp.routing</field>
<field name="arch" type="xml">
<tree string="Routing">
<tree string="Work Order Operations">
<field name="code"/>
<field name="name"/>
<field name="location_id"/>
@@ -321,8 +321,8 @@
<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)]"/>
<search string="Work Order Operations">
<field name="name" string="Work Order Operations" filter_domain="['|',('name','ilike',self),('code','ilike',self)]"/>
<filter string="Inactive" icon="terp-gdu-smart-failing" domain="[('active','=',False)]"/>
<field name="location_id"/>
<field name="company_id" groups="base.group_multi_company"/>
@@ -333,7 +333,7 @@
</field>
</record>
<record id="mrp_routing_action" model="ir.actions.act_window">
<field name="name">Routings</field>
<field name="name">Work Order Operations</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">mrp.routing</field>
<field name="view_type">form</field>
@@ -341,16 +341,16 @@
<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 routing.
Click to create a Work Order Operations.
</p><p>
Routings allow you to create and manage the manufacturing
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 raw materials.
</p>
</field>
</record>
<menuitem action="mrp_routing_action" id="menu_mrp_routing_action" parent="mrp.menu_mrp_bom" groups="mrp.group_mrp_routings" sequence="15"/>
<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
@@ -403,7 +403,7 @@
</tree>
</field>
</page>
<page string="Properties" groups="product.group_mrp_properties">
<page string="Properties" groups="base.group_no_one">
<group>
<group>
<field name="position"/>
@@ -417,8 +417,13 @@
<field name="product_efficiency"/>
</group>
</group>
<separator string="Properties"/>
<field name="property_ids" widget="many2many_tags"/>
<lable string="Properties"/>
<group>
<group>
<field name="property_ids" widget="many2many_tags"/>
</group>
<group/>
</group>
</page>
</notebook>
<div class="oe_chatter">
@@ -442,7 +447,7 @@
<group expand="0" string="Group By...">
<filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_tmpl_id'}"/>
<filter string='Default Unit of Measure' icon="terp-mrp" domain="[]" context="{'group_by' : 'product_uom'}"/>
<filter string="Routing" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'routing_id'}"/>
<filter string="Work Order Operations" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'routing_id'}"/>
<filter string='Type' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'type'}"/>
<filter string=" Valid From Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_start'}" help="Valid From Date by Month"/>
</group>
@@ -523,7 +528,7 @@
<filter string="Bill Of Material" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'bom_id'}"/>
<filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
<filter string='Default Unit of Measure' icon="terp-mrp" domain="[]" context="{'group_by' : 'product_uom'}"/>
<filter string="Routing" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'routing_id'}"/>
<filter string="Work Order Operations" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'routing_id'}"/>
<filter string='Type' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'type'}"/>
<filter string=" Valid From Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_start'}" help="Valid From Date by Month"/>
</group>
@@ -688,6 +693,7 @@
<group>
<group>
<field name="product_id" on_change="product_id_change(product_id, product_qty)" domain="[('bom_ids','!=',False),('bom_ids.type','!=','phantom')]" class="oe_inline" context='{"default_type": "product"}'/>
<field name="product_tmpl_id" invisible="1"/>
<label for="product_qty"/>
<div>
<field name="product_qty" class="oe_inline" on_change="product_id_change(product_id, product_qty)"/>
@@ -711,7 +717,7 @@
'&amp;',
('product_tmpl_id.product_variant_ids','=',product_id),
('product_id','=',False)]"
context="{'default_product_id': product_id}" on_change="bom_id_change(bom_id)" required="1"/>
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" class="oe_inline" 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"/>
@@ -824,8 +830,8 @@
<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="stock.group_locations"/>
<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>
@@ -854,11 +860,12 @@
<separator/>
<filter icon="terp-gnome-cpu-frequency-applet+" string="Late" domain="['&amp;', ('date_planned','&lt;', 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" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
<filter string="Routing" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'routing_id'}"/>
<filter string="Work Order Operations" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'routing_id'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Scheduled Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_planned'}" help="Scheduled Date by Month"/>
</group>
+2 -2
View File
@@ -44,9 +44,9 @@ class mrp_config_settings(osv.osv_memory):
'Without this module: A + B + C -> D.\n'
'With this module: A + B + C -> D + E.\n'
'-This installs the module mrp_byproduct.'),
'group_mrp_routings': fields.boolean("Manage routings and work orders ",
'group_mrp_routings': fields.boolean("Manage Work Order Operations and work orders ",
implied_group='mrp.group_mrp_routings',
help='Routings allow you to create and manage the manufacturing operations that should be followed '
help='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 raw materials.'),
'group_mrp_properties': fields.boolean("Allow several bill of materials per products using properties",
+1 -1
View File
@@ -15,7 +15,7 @@
</record>
<record id="group_mrp_routings" model="res.groups">
<field name="name">Manage Routings</field>
<field name="name">Manage Work Order Operations</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
+3 -4
View File
@@ -47,14 +47,13 @@ part based on another part consuming it).
<section class="oe_container">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan">Define Flexible Master Data</h2>
<h3 class="oe_slogan">Products, Bill of Materials and Routings</h3>
<h3 class="oe_slogan">Products, Bill of Materials and Work Order Operations</h3>
<div class="oe_span6">
<img class="oe_picture oe_screenshot" src="mrp_bom.png">
</div>
<div class="oe_span6">
<p class="oe_mt32">
Get the flexibility to create multi-level bill of materials, optional routing,
version changes and phantom bill of materials. You can use BoM for kits or for
Get the flexibility to create multi-level bill of materials, optional Work Order Operations,version changes and phantom bill of materials. You can use BoM for kits or for
manufacturing orders.
</p>
</div>
@@ -88,7 +87,7 @@ manufacturing orders.
</div>
<div class="oe_span6">
<p class="oe_mt32">
Define routings and plan the working time and capacity of your resources.
Define Work Order Operations and plan the working time and capacity of your resources.
Quickly identify resource requirements and bottlenecks to ensure your production
meets your delivery schedule dates.
</p>
+1 -1
View File
@@ -85,7 +85,7 @@
</group>
<field name="description" placeholder="describe the product characteristics..."/>
</page>
<page string="Procurements" groups="base.group_user">
<page string="Procurements" name="procurements" groups="base.group_user">
<group name="procurement">
<group name="general" col="4">
<field name="standard_price"/>
+7 -5
View File
@@ -147,11 +147,13 @@
<field name="product_manager" position="attributes">
<attribute name="context">{'default_groups_ref': ['base.group_user', 'base.group_sale_manager', 'stock.group_stock_manager']}</attribute>
</field>
<group name="procurement" position="after" >
<group string="Supply Chain Information" attrs="{'invisible': [('type', '=', 'service')]}" groups="base.group_user">
<field name="route_ids" widget="many2many_checkboxes"/>
</group>
</group>
<page name="procurements" position="after">
<page string="Supply Chain" groups="base.group_user" attrs="{'invisible': [('type', '=', 'service')]}">
<group>
<field name="route_ids" widget="many2many_checkboxes"/>
</group>
</page>
</page>
</field>
</record>