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.
Detected cases where account_partial_reconcile has null currency_id, thus giving falsy amount_currency, and thus making some reconciled invoices appearing in the outstanding. Used _amount_residual of account move lines as reference to fix it.
partner_statement 13.0.1.2.1
* show partner name at the top.
* simplify view logic for `name` and `ref` printing.
* fallback to journal entry `ref` when the journal item has no
`ref` set.
* little query formatting changes to enhance readability.
[UPD] Update partner_statement.pot
[UPD] README.rst
partner_statement 13.0.1.1.0
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
Translation: account-financial-reporting-13.0/account-financial-reporting-13.0-partner_statement
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-13-0/account-financial-reporting-13-0-partner_statement/
In certain scenarios involving mutliple payments for multiple
invoices, where the reconciliation happens together and the debit
move is the smaller item the aging duplicates its value, making
the balance greater than it should be.
This fix works by preventing moves where different lines are both partial
reconciled being grouped together by adding the lines id
to the group by clause of _show_buckets_sql_q1
By default we checked for an empty data dict in _get_report_values
however the mail template sends a file type and editor key by default.
We now check if the required company_id is in the dictionary. We also support
supplying force_company in context for setting the company for auto generated
emails.
[UPD] README.rst
[UPD] Update partner_statement.pot
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
Translation: account-financial-reporting-12.0/account-financial-reporting-12.0-partner_statement
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-12-0/account-financial-reporting-12-0-partner_statement/
Before this change, if a payment was reconciled using the bank statement widget
the move was seperated into many multiples of lines making activity
statements twice as long as necessary.
Now payments are a single line