[FIX] website_quote: price unit for suggested products
In a SO, the unit price of the suggested products must be computed with the pricelist linked to this SO. Inspired from function 'product_id_change' in model 'sale.order.line'. opw:650168
This commit is contained in:
parent
e11f50599d
commit
06fbf3a572
|
@ -317,6 +317,10 @@ class sale_order_option(osv.osv):
|
||||||
if product.description_sale:
|
if product.description_sale:
|
||||||
self.name += '\n' + product.description_sale
|
self.name += '\n' + product.description_sale
|
||||||
self.uom_id = product.product_tmpl_id.uom_id
|
self.uom_id = product.product_tmpl_id.uom_id
|
||||||
|
if product and self.order_id.pricelist_id:
|
||||||
|
partner_id = self.order_id.partner_id.id
|
||||||
|
pricelist = self.order_id.pricelist_id.id
|
||||||
|
self.price_unit = self.order_id.pricelist_id.price_get(product.id, self.quantity, partner_id)[pricelist]
|
||||||
|
|
||||||
|
|
||||||
class product_template(osv.Model):
|
class product_template(osv.Model):
|
||||||
|
|
Loading…
Reference in New Issue