From 894143cb4ceaff068dcc3f01f419276156229d95 Mon Sep 17 00:00:00 2001 From: Sandy Carter Date: Fri, 28 Nov 2014 13:43:03 -0500 Subject: [PATCH 1/2] [FIX] res.groups: when generating initial group view, use admin context and language This means group category names can be translated in the default/installation database language. Closes #3921 --- openerp/addons/base/res/res_users.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openerp/addons/base/res/res_users.py b/openerp/addons/base/res/res_users.py index 137b953eeb6..0e488982e7d 100644 --- a/openerp/addons/base/res/res_users.py +++ b/openerp/addons/base/res/res_users.py @@ -705,6 +705,10 @@ class groups_view(osv.osv): def update_user_groups_view(self, cr, uid, context=None): # the view with id 'base.user_groups_view' inherits the user form view, # and introduces the reified group fields + if not context or context.get('install_mode'): + # use installation/admin language for translatable names in the view + context = dict(context or {}) + context.update(self.pool['res.users'].context_get(cr, uid)) view = self.get_user_groups_view(cr, uid, context) if view: xml1, xml2 = [], [] From 7530d2818321ce0e71c79a0edc6bb9abc541816f Mon Sep 17 00:00:00 2001 From: Ravi Gohil Date: Wed, 2 Jul 2014 19:28:05 +0530 Subject: [PATCH 2/2] [FIX] mrp: production traceability Upstream traceability on produced goods (serial number on finished product) was broken due to wrong values in cache for production.move_lines2 after production. Refresh the value of production after each action_consume to make such the state of the cache is correct. opw 609450 Similar fix for manufactruing order not going in done state in some specific configrations (e.g. some components being phantom BOM). Again due to wrong cache state after consumption. opw 610515 Fixes #1296 --- addons/mrp/mrp.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index aff1a51ffaa..a5d57114c37 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -795,6 +795,7 @@ class mrp_production(osv.osv): continue raw_product[0].action_consume(qty, raw_product[0].location_id.id, context=context) + production.refresh() if production_mode == 'consume_produce': # To produce remaining qty of final product @@ -820,6 +821,7 @@ class mrp_production(osv.osv): raise osv.except_osv(_('Warning!'), _('You are going to produce total %s quantities of "%s".\nBut you can only produce up to total %s quantities.') % ((subproduct_factor * production_qty), prod_name, rest_qty)) if rest_qty > 0 : stock_mov_obj.action_consume(cr, uid, [produce_product.id], (subproduct_factor * production_qty), context=context) + production.refresh() for raw_product in production.move_lines2: new_parent_ids = []