From 98bba5fa0b22f7b8ab513bcfa7457f6abed28580 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Fri, 6 Dec 2019 15:54:01 +0000 Subject: [PATCH] [FIX] account: invoice report fallback company currency In 13.0 if currency_id is not set, we are fallbacking on company_currency_id. This was not taken into account in account.invoice.report view and so when grouping by currency, we would get an "Undefined" grouping which meant "company currency". Now we fallback on company_currency in the view, and if we displayed data for several companies with different currency, this should also remove the amalgamation of different currency in "Undefined" group. opw-2151492 closes #41491 closes odoo/odoo#41593 X-original-commit: ee2858c9c9eec5121b63bd8565980d93846bcade Signed-off-by: Nicolas Lempereur (nle) --- addons/account/report/account_invoice_report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/report/account_invoice_report.py b/addons/account/report/account_invoice_report.py index 2d870127921..1a4f443b91f 100644 --- a/addons/account/report/account_invoice_report.py +++ b/addons/account/report/account_invoice_report.py @@ -84,7 +84,7 @@ class AccountInvoiceReport(models.Model): line.analytic_account_id, line.journal_id, line.company_id, - line.currency_id, + COALESCE(line.currency_id, line.company_currency_id) AS currency_id, line.partner_id AS commercial_partner_id, move.name, move.state,