[FIX] purchase_stock: use currecny rate at move date when computing move unit price

Error introduced when using new res.currency API at 7a282c9965
This commit is contained in:
Olivier Colson
2018-05-29 16:25:35 +02:00
committed by Christophe Simonis
parent 66ccc6503d
commit bc0173c2d5
+1 -1
View File
@@ -47,7 +47,7 @@ class StockMove(models.Model):
price_unit *= line.product_uom.factor / line.product_id.uom_id.factor
if order.currency_id != order.company_id.currency_id:
price_unit = order.currency_id._convert(
price_unit, order.company_id.currency_id, order.company_id, order.date_order or fields.Date.today(), round=False)
price_unit, order.company_id.currency_id, order.company_id, self.date, round=False)
return price_unit
return super(StockMove, self)._get_price_unit()