diff --git a/addons/product_visible_discount/product_visible_discount.py b/addons/product_visible_discount/product_visible_discount.py index 077ec1efa21..5d77144e4cf 100644 --- a/addons/product_visible_discount/product_visible_discount.py +++ b/addons/product_visible_discount/product_visible_discount.py @@ -57,7 +57,7 @@ class sale_order_line(osv.osv): if line.product_id.company_id and line.order_id.pricelist_id.currency_id.id != line.product_id.company_id.currency_id.id: # new_list_price is in company's currency while price in pricelist currency ctx = dict(context_partner, date=self.order_id.date_order) - new_list_price = self.env['res.currency'].browse(currency_id).with_context(ctx).compute(new_list_price, line.order_id.pricelist_id.currency_id.id) + new_list_price = self.env['res.currency'].browse(currency_id).with_context(ctx).compute(new_list_price, line.order_id.pricelist_id.currency_id) discount = (new_list_price - line.price_unit) / new_list_price * 100 if discount > 0: line.price_unit = new_list_price @@ -86,7 +86,7 @@ class sale_order_line(osv.osv): if self.product_id.company_id and self.order_id.pricelist_id.currency_id.id != self.product_id.company_id.currency_id.id: # new_list_price is in company's currency while price in pricelist currency ctx = dict(context_partner, date=self.order_id.date_order) - new_list_price = self.env['res.currency'].browse(currency_id).with_context(ctx).compute(new_list_price, self.order_id.pricelist_id.currency_id.id) + new_list_price = self.env['res.currency'].browse(currency_id).with_context(ctx).compute(new_list_price, self.order_id.pricelist_id.currency_id) discount = (new_list_price - self.price_unit) / new_list_price * 100 if discount > 0: self.price_unit = new_list_price