[FIX] sale: in a SO line, changing uom qty must change uos qty
This is a regression from rev.
1cedcf6abb
Not updating the product uos qty on updating the uom qty
is wrong, and it has multiple side-effect.
The SO line margin not being correctly recomputed
when changing the quantity is one of them.
opw-647902
This commit is contained in:
parent
6947313cd0
commit
9a9720ac14
|
@ -1199,7 +1199,10 @@ class sale_order_line(osv.osv):
|
||||||
else:
|
else:
|
||||||
result.update({'price_unit': price})
|
result.update({'price_unit': price})
|
||||||
if context.get('uom_qty_change', False):
|
if context.get('uom_qty_change', False):
|
||||||
return {'value': {'price_unit': price}, 'domain': {}, 'warning': False}
|
values = {'price_unit': price}
|
||||||
|
if result.get('product_uos_qty'):
|
||||||
|
values['product_uos_qty'] = result['product_uos_qty']
|
||||||
|
return {'value': values, 'domain': {}, 'warning': False}
|
||||||
if warning_msgs:
|
if warning_msgs:
|
||||||
warning = {
|
warning = {
|
||||||
'title': _('Configuration Error!'),
|
'title': _('Configuration Error!'),
|
||||||
|
|
Loading…
Reference in New Issue