From 851992cdd6d44611da69ff0ab51b98775b00fb9b Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Mon, 15 Feb 2016 16:31:17 +0100 Subject: [PATCH] [FIX] product_visible_discount: lst_price In a SO line, the price unit is taken from function "_product_price" set on the product(model: "product.product"), this is why the variable new_list_price has to be taken on the product too. In this way, the right discount can be computed. Before the fix, new_list_price was equal to the price set on the product template(list_price) then if the product template had several variants with several sale price, the discount was wrongly computed. opw:668636 --- addons/product_visible_discount/product_visible_discount.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/product_visible_discount/product_visible_discount.py b/addons/product_visible_discount/product_visible_discount.py index 5d77144e4cf..98363e6ff42 100644 --- a/addons/product_visible_discount/product_visible_discount.py +++ b/addons/product_visible_discount/product_visible_discount.py @@ -20,7 +20,7 @@ class sale_order_line(osv.osv): """Retrieve the price before applying the pricelist""" item_obj = self.pool['product.pricelist.item'] product_obj = self.pool['product.product'] - field_name = 'list_price' + field_name = 'lst_price' currency_id = None if res_dict.get(pricelist): rule_id = res_dict[pricelist][1]