[FIX] sale: The order lines weight must change when the quantity change

This is a regression of
1cedcf6abb
and a following of
9a9720ac14

opw-709700
This commit is contained in:
Denis Ledoux 2017-03-03 10:53:22 +01:00
parent 2b8605c6e2
commit df5f0f2570
1 changed files with 3 additions and 2 deletions

View File

@ -1225,8 +1225,9 @@ class sale_order_line(osv.osv):
result.update({'price_unit': price})
if context.get('uom_qty_change', False):
values = {'price_unit': price}
if result.get('product_uos_qty'):
values['product_uos_qty'] = result['product_uos_qty']
for field in ['product_uos_qty', 'th_weight']:
if result.get(field):
values[field] = result[field]
return {'value': values, 'domain': {}, 'warning': False}
if warning_msgs:
warning = {