[FIX] sale: Sale Order Line Onchange
Changing the product quantity must not change Product UOM. opw:644542
This commit is contained in:
parent
521c21bf7f
commit
1cedcf6abb
|
@ -1188,6 +1188,8 @@ class sale_order_line(osv.osv):
|
||||||
warning_msgs += _("No valid pricelist line found ! :") + warn_msg +"\n\n"
|
warning_msgs += _("No valid pricelist line found ! :") + warn_msg +"\n\n"
|
||||||
else:
|
else:
|
||||||
result.update({'price_unit': price})
|
result.update({'price_unit': price})
|
||||||
|
if context.get('uom_qty_change', False):
|
||||||
|
return {'value': {'price_unit': price}, 'domain': {}, 'warning': False}
|
||||||
if warning_msgs:
|
if warning_msgs:
|
||||||
warning = {
|
warning = {
|
||||||
'title': _('Configuration Error!'),
|
'title': _('Configuration Error!'),
|
||||||
|
|
|
@ -129,7 +129,7 @@
|
||||||
<label for="product_uom_qty"/>
|
<label for="product_uom_qty"/>
|
||||||
<div>
|
<div>
|
||||||
<field
|
<field
|
||||||
context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom}"
|
context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom, 'uom_qty_change':True}"
|
||||||
name="product_uom_qty" class="oe_inline"
|
name="product_uom_qty" class="oe_inline"
|
||||||
on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, False, False, parent.date_order, False, parent.fiscal_position, True, context)"/>
|
on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, False, False, parent.date_order, False, parent.fiscal_position, True, context)"/>
|
||||||
<field name="product_uom" groups="product.group_uom" class="oe_inline oe_no_button"
|
<field name="product_uom" groups="product.group_uom" class="oe_inline oe_no_button"
|
||||||
|
|
Loading…
Reference in New Issue