[FIX] product_visible_discount: wrong argument type

Fix call to v8 method with wrong argument type

Closes #10745
opw-668544
This commit is contained in:
Thomas Groutars
2016-02-03 13:30:17 +01:00
committed by Nicolas Martinelli
parent 1fb9227893
commit cc36e03ddc
@@ -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