From cc36e03ddc83e73f7b2fa76b9a46e3eaa6298f25 Mon Sep 17 00:00:00 2001 From: Thomas Groutars Date: Tue, 2 Feb 2016 18:41:20 -0800 Subject: [PATCH] [FIX] product_visible_discount: wrong argument type Fix call to v8 method with wrong argument type Closes #10745 opw-668544 --- addons/product_visible_discount/product_visible_discount.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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