From 7771c45ed9fc2fa63e32fbfa137109a741d283ba Mon Sep 17 00:00:00 2001 From: Jos De Graeve Date: Fri, 3 Jul 2015 14:09:31 +0200 Subject: [PATCH] [FIX] sale: product_id_change ignores context The product_id_change method of sale.order.line ignored the passed context. The context was simply overwritten, which is no a good practice. Besides, it prevents customizations. Closes #7447 opw-643983 --- addons/sale/sale.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 967e5030d6c..48ad722300b 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -1068,10 +1068,10 @@ class sale_order_line(osv.osv): product_uom_obj = self.pool.get('product.uom') partner_obj = self.pool.get('res.partner') product_obj = self.pool.get('product.product') - context = {'lang': lang, 'partner_id': partner_id} partner = partner_obj.browse(cr, uid, partner_id) lang = partner.lang - context_partner = {'lang': lang, 'partner_id': partner_id} + context_partner = context.copy() + context_partner.update({'lang': lang, 'partner_id': partner_id}) if not product: return {'value': {'th_weight': 0,