From 26bbfc46f628d3055ed018bf751ad4584bca18de Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Thu, 20 Oct 2016 09:55:19 +0200 Subject: [PATCH] [FIX] stock_account: stop comparing apples and oranges company_currency is a recordset, not an id Introduced at 19199457 Closes #13707 --- addons/stock_account/models/account_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock_account/models/account_invoice.py b/addons/stock_account/models/account_invoice.py index 5dba13166ae..115006e4c48 100644 --- a/addons/stock_account/models/account_invoice.py +++ b/addons/stock_account/models/account_invoice.py @@ -76,7 +76,7 @@ class AccountInvoiceLine(models.Model): return self.product_id.standard_price def _get_price(self, company_currency, price_unit): - if self.invoice_id.currency_id.id != company_currency: + if self.invoice_id.currency_id.id != company_currency.id: price = company_currency.with_context(date=self.invoice_id.date_invoice).compute(price_unit * self.quantity, self.invoice_id.currency_id) else: price = price_unit * self.quantity