From 353dfa22cb61ec44ef308e16c65024c55a241b31 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Mon, 1 Aug 2016 14:32:19 +0200 Subject: [PATCH] [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 --- addons/sale/sale_analytic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale/sale_analytic.py b/addons/sale/sale_analytic.py index 9b4f2e789be..e3b5fdcb440 100644 --- a/addons/sale/sale_analytic.py +++ b/addons/sale/sale_analytic.py @@ -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