From fede8a8cfbf25532b10bcba10e2ed3ba18cc7842 Mon Sep 17 00:00:00 2001 From: Bhavik Bagdiya Date: Fri, 7 Nov 2014 17:15:49 +0530 Subject: [PATCH] [IMP] mrp: usability onboarding Various views and labelling changes --- addons/mrp/__openerp__.py | 8 ++--- addons/mrp/mrp.py | 32 +++++++++--------- addons/mrp/mrp_view.xml | 41 ++++++++++++++---------- addons/mrp/res_config.py | 4 +-- addons/mrp/security/mrp_security.xml | 2 +- addons/mrp/static/description/index.html | 7 ++-- addons/product/product_view.xml | 2 +- addons/stock/product_view.xml | 12 ++++--- 8 files changed, 59 insertions(+), 49 deletions(-) diff --git a/addons/mrp/__openerp__.py b/addons/mrp/__openerp__.py index 017fcc74fe5..d4f6dc0c2f7 100644 --- a/addons/mrp/__openerp__.py +++ b/addons/mrp/__openerp__.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- ############################################################################## # -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). +# Odoo, Open Source Management Solution +# Copyright (C) 2004-TODAY Odoo S.A. (). # # 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 diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index dd089e728f7..a39b50de860 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -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 diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml index 0cd2025490b..017fc7a6502 100644 --- a/addons/mrp/mrp_view.xml +++ b/addons/mrp/mrp_view.xml @@ -282,7 +282,7 @@ mrp.routing.form mrp.routing -
+ @@ -309,7 +309,7 @@ mrp.routing.tree mrp.routing - + @@ -321,8 +321,8 @@ mrp.routing.search mrp.routing - - + + @@ -333,7 +333,7 @@ - Routings + Work Order Operations ir.actions.act_window mrp.routing form @@ -341,16 +341,16 @@

- Click to create a routing. + Click to create a Work Order Operations.

- 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.

- +