[FIX] product_visible_discount: use on_change result for product value
At the end of the onchange call product_id_change, the uom may have changed (e.g. if product in different category). To compute the quantity, we need to use the new uom and not the first one (that may be Unit, default value)
This commit is contained in:
parent
96bcaadd46
commit
fcc59f12fc
|
@ -79,7 +79,7 @@ class sale_order_line(osv.osv):
|
|||
price=result['price_unit']
|
||||
else:
|
||||
return res
|
||||
|
||||
uom = result.get('product_uom', uom)
|
||||
product = product_obj.browse(cr, uid, product, context)
|
||||
list_price = pricelist_obj.price_get(cr, uid, [pricelist],
|
||||
product.id, qty or 1.0, partner_id, {'uom': uom,'date': date_order })
|
||||
|
|
Loading…
Reference in New Issue