[FIX] sale: use updated context instead of new one
Keep the existing information in the context for the price_get call instead of creating a new one. Closes #7646
This commit is contained in:
parent
707db0399e
commit
3033790ef1
|
@ -1176,11 +1176,13 @@ class sale_order_line(osv.osv):
|
|||
'Please set one before choosing a product.')
|
||||
warning_msgs += _("No Pricelist ! : ") + warn_msg +"\n\n"
|
||||
else:
|
||||
ctx = dict(
|
||||
context,
|
||||
uom=uom or result.get('product_uom'),
|
||||
date=date_order,
|
||||
)
|
||||
price = self.pool.get('product.pricelist').price_get(cr, uid, [pricelist],
|
||||
product, qty or 1.0, partner_id, {
|
||||
'uom': uom or result.get('product_uom'),
|
||||
'date': date_order,
|
||||
})[pricelist]
|
||||
product, qty or 1.0, partner_id, ctx)[pricelist]
|
||||
if price is False:
|
||||
warn_msg = _("Cannot find a pricelist line matching this product and quantity.\n"
|
||||
"You have to change either the product, the quantity or the pricelist.")
|
||||
|
|
Loading…
Reference in New Issue