diff options
| author | Olivier Dony <odo@openerp.com> | 2015-03-09 15:03:19 +0100 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2015-03-09 15:03:19 +0100 |
| commit | 3a8ce072cdb581d892b9b6c7facfc0ebd5954048 (patch) | |
| tree | 6730a88855bbe0c7d1ba58fb4922533decb85a60 | |
| parent | 64da3c5e176f3e3904ac551674922caa7633d684 (diff) | |
[FIX] sale_stock: context is generally frozen in 8.0
| -rw-r--r-- | addons/sale_stock/sale_stock.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/sale_stock/sale_stock.py b/addons/sale_stock/sale_stock.py index dd592894ee6..3db5c35ca5b 100644 --- a/addons/sale_stock/sale_stock.py +++ b/addons/sale_stock/sale_stock.py @@ -300,12 +300,12 @@ class sale_order_line(osv.osv): return res # set product uom in context to get virtual stock in current uom - if res.get('value', {}).get('product_uom'): + if 'product_uom' in res.get('value', {}): # use the uom changed by super call - context.update({'uom': res['value']['product_uom']}) + context = dict(context, uom=res['value']['product_uom']) elif uom: # fallback on selected - context.update({'uom': uom}) + context = dict(context, uom=uom) #update of result obtained in super function product_obj = product_obj.browse(cr, uid, product, context=context) |
