From 06fbf3a5728e727a537ea4f6f0773acc5bba0c12 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Mon, 28 Sep 2015 14:46:01 +0200 Subject: [PATCH] [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 --- addons/website_quote/models/order.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/website_quote/models/order.py b/addons/website_quote/models/order.py index ff8fa7bf672..046ade6ef09 100644 --- a/addons/website_quote/models/order.py +++ b/addons/website_quote/models/order.py @@ -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):