[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:
Goffin Simon 2015-09-28 14:46:01 +02:00
parent e11f50599d
commit 06fbf3a572
1 changed files with 4 additions and 0 deletions

View File

@ -317,6 +317,10 @@ class sale_order_option(osv.osv):
if product.description_sale:
self.name += '\n' + product.description_sale
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):