[FIX] sale: currency of amount in _get_invoice_price

The currency of amount is the currency of the company as defined in
account.analytic.line in module analytic and in module account.

opw:682378
This commit is contained in:
Goffin Simon
2016-08-02 09:50:02 +02:00
parent 9bb16c5ce1
commit 353dfa22cb
+1 -1
View File
@@ -43,7 +43,7 @@ class AccountAnalyticLine(models.Model):
if self.unit_amount == 0.0:
return 0.0
price_unit = abs(self.amount / self.unit_amount)
currency_id = self.currency_id or self.account_id.currency_id
currency_id = self.company_id.currency_id
if currency_id and currency_id != order.currency_id:
price_unit = currency_id.compute(price_unit, order.currency_id)
return price_unit