From 7ac19968f7305116f31ba71eb68fa9efef8783a2 Mon Sep 17 00:00:00 2001 From: oco-odoo Date: Thu, 3 Aug 2017 09:34:42 +0200 Subject: [PATCH] [FIX] stock_account: currency comparison on invoices (#18655) In anglosaxon accounting's stock valuation, the case where invoice and company currencies are different was not managed properly, because of a syntactic error in the condition checking this case. (this has already been merged on saas-14, but the PR should have initially been made for 10.0 ... my mistake ! See https://github.com/odoo/odoo/pull/17259 ) --- 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 aacdd6c7177..510fc2daf8d 100644 --- a/addons/stock_account/models/account_invoice.py +++ b/addons/stock_account/models/account_invoice.py @@ -38,7 +38,7 @@ class AccountInvoice(models.Model): cacc = accounts['expense'].id if dacc and cacc: price_unit = i_line._get_anglo_saxon_price_unit() - if inv.currency_id.id != company_currency: + if inv.currency_id != company_currency: currency_id = inv.currency_id.id amount_currency = i_line._get_price(company_currency, price_unit) else: