Files
Odoo-18.0-20251222/partner_statement
Graeme Gellatly bfa55e80ff [FIX][15.0] partner-statement: Remove need to groupby on amount_currency in Activity Statement
By aggregating before the case statement there is no need to group by amount_currency.

In earlier versions of Odoo this bug only presented in multicurrency transactions as company currency transactions
would have an amount_currency of 0.0 and group by 0.0 just fine.

In later versions of Odoo amount_currency is always set and this causes otherwise identical move lines
that should be summed to display seperately. However, amount_currency was required in groupby because it
was part of a non aggregated case statement with the sum inside.

By reversing the nesting we remove the need to group by amount_currency. This is safe because we already group by
currency_id and aggregates are not evaluated until after group by completes.
2025-07-22 12:17:12 +02:00
..
2025-07-22 12:17:12 +02:00