[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) <nle@odoo.com>
This commit is contained in:
Nicolas Lempereur
2019-12-09 13:15:43 +00:00
parent 145bd8c49f
commit 98bba5fa0b
@@ -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,