From 99ccb7f384c4a542ca29962046787f22112a8a25 Mon Sep 17 00:00:00 2001 From: Damien Bouvy Date: Wed, 30 Sep 2015 14:01:20 +0200 Subject: [PATCH] [FIX] website_quote: either you adapt the price or you don't When changing the template of a quote, lines and suggested lines are added to your quotation The price of line is adapted to the quote's pricelist but not the price of options This commit adds this behaviour to option lines --- addons/website_quote/models/order.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/website_quote/models/order.py b/addons/website_quote/models/order.py index fab4297c6b8..b0ba3e0b9b0 100644 --- a/addons/website_quote/models/order.py +++ b/addons/website_quote/models/order.py @@ -230,7 +230,9 @@ class sale_order(osv.osv): options = [] for option in quote_template.options: if pricelist_id: - price = pricelist_obj.price_get(cr, uid, [pricelist_id], option.product_id.id, 1, context=context)[pricelist_id] + uom_context = context.copy() + uom_context['uom'] = option.uom_id.id + price = pricelist_obj.price_get(cr, uid, [pricelist_id], option.product_id.id, 1, context=uom_context)[pricelist_id] else: price = option.price_unit options.append((0, 0, {