From c477f0764e2ab088233a68c53fc66eabf01ce2ec Mon Sep 17 00:00:00 2001 From: Denis Vermylen Date: Mon, 16 Oct 2017 16:33:58 +0200 Subject: [PATCH] [FIX] sale: pricelist price base When setting a pricelist to show the public price discount, it ignored the pricelist item's base field (if not 'Other Pricelist') and set it by default on the lst_price instead. This did not work when you based your discount on the standard_price (= cost price) with public price discount. Now it does. opw: 775275 --- addons/sale/models/sale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale/models/sale.py b/addons/sale/models/sale.py index 1c644a9cdaf..84ac2bfa5e8 100644 --- a/addons/sale/models/sale.py +++ b/addons/sale/models/sale.py @@ -857,7 +857,7 @@ class SaleOrderLine(models.Model): return price else: from_currency = self.order_id.company_id.currency_id - return from_currency.compute(product.lst_price, self.order_id.pricelist_id.currency_id) + return from_currency.compute(product[pricelist_item.base], self.order_id.pricelist_id.currency_id) @api.multi @api.onchange('product_id')