[FIX] sale_stock: context is generally frozen in 8.0

This commit is contained in:
Olivier Dony 2015-03-09 15:03:19 +01:00
parent 64da3c5e17
commit 3a8ce072cd
1 changed files with 3 additions and 3 deletions

View File

@ -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)