Friday, September 11, 2026
2 changes · 17.0
Resolved issues and error corrections
Fixes German DATEV CSV exports so expense payment lines use the correct offset account and keep the expected tax code. This helps companies produce accurate general ledger export files for accounting and tax reporting.
Original PR description
When creating a payment for an expense, the outstanding line was added as the last line. This creates an issue in the l10n_de DATEV DATA general ledger report. - Create an expense for a contact paid by the company and generate the report. - Approve the expense and post the journal entries. - In the general ledger, download the DATEV DATA CSV file. - For the line corresponding to the payment of the expense, there is no BU code (tax). In _l10n_de_datev_get_csv, the first line of the move is considered the outstanding line, but in the case of expense payments it was actually the last line. As a result, the outstanding line was included instead of the line with the tax. After this commit, in the case of a payment, we explicitly search for the outstanding line to use as the payment_account (Gegenkonto). Ticket [link](https://www.odoo.com/odoo/project/967/tasks/4904057) opw-4904057
Account reports now avoid showing duplicate lines when users expand grouped report sections and click Load More. This prevents report display errors and reduces the risk of seeing the same accounting entry more than once in paginated report details.
Original PR description
Account reports can use "Load More" to paginate the lines generated when expanding a groupby. A report line can contain several expressions, which may return overlapping grouping keys. Problem: The…
Account reports can use "Load More" to paginate the lines generated when expanding a groupby. A report line can contain several expressions, which may return overlapping grouping keys. Problem: The limit and offset are applied while computing each expression, before their results are aggregated by grouping key. As a result, a grouping key from a previous page can be returned again by the next "Load More" request. This results in duplicate report lines. In 17.0, this causes an Owl error because line.id is used as the key when rendering the lines. From 18.0 onward, line_index is used instead, so the rendering error no longer occurs. However, the underlying issue remains, and the same account move line can be displayed multiple times if it matches multiple expressions. Solution: Instead of applying the offset to each expression, compute the expression results first. Merge their grouping keys, then apply the offset and limit to the resulting unique keys before generating the report lines. This can be reproduced by using "Load More" on a report where multiple expressions return overlapping grouping keys. Example steps to reproduce: 1. Create or switch to a Mexican company and install l10n_mx_reports so the DIOT report is available. 2. Create a partner and 100 posted journal entries for that partner in the same period. Add the +DIOT: 16% tag to all 100 account move lines and the -DIOT: Retención tag to the first 90. 3. Open Accounting > Reporting > Tax Reports > DIOT. 4. Unfold the partner and click "Load More". Related ticket: opw-6471063