Saturday, September 5, 2026
2 changes · 19.0
Resolved issues and error corrections
Fixes an accounting rounding issue where imported multi-line invoices using global tax rounding could show line subtotals that did not match the amounts actually posted. This keeps invoice totals and displayed subtotals consistent, which is especially important for Belgian tax requirements and customer-facing accounting accuracy.
Original PR description
Steps to reproduce: - Set a company's tax rounding method to round_globally (the be_comp default, required by Belgian law). - Import a multi-line UBL invoice where more than one line's amount doesn't…
Steps to reproduce: - Set a company's tax rounding method to round_globally (the be_comp default, required by Belgian law). - Import a multi-line UBL invoice where more than one line's amount doesn't divide evenly under the invoice's tax. - Open the invoice: some lines' displayed Subtotal doesn't match what's actually posted on the line's balance, and the invoice's Untaxed Amount doesn't equal the sum of the displayed line subtotals. Cause of the issue: account.move.line._compute_totals() rounds price_subtotal/price_total one line at a time. Under round_globally, the balance actually posted on a line is decided by _sync_tax_lines()/_get_rounded_base_and_tax_lines(), which round the whole move together and redistribute a few cents of delta across its lines. Since _compute_totals() never grouped lines together and never added that redistributed delta back into price_subtotal, the two values could permanently disagree as soon as a move had more than one line. Solution: Round a move's relevant lines together in _compute_totals(), the same way _get_rounded_base_and_tax_lines() does for balance, and fold the redistributed delta into price_subtotal/price_total. The full set of a move's lines is re-fetched from move_id.line_ids on every call (not just the lines in self), because _sync_tax_lines() itself writes the final amount_currency back onto each line one at a time - and amount_currency is one of this compute's own dependencies, so that write would otherwise re-trigger it in isolation and undo the grouped result. opw-6431707
French PDP Flow 10 invoices now use the correct document type codes for both sales and purchase documents. This prevents vendor bills from being mislabeled as credit notes, reducing the risk of rejection during electronic invoicing.
Original PR description
Flow 10 used move.is_inbound() to distinguish invoices from credit notes. While this gives the expected result for sales documents, it reverses the codes for purchase documents. Vendor bills were therefore reported as credit notes and could be rejected for having no preceding invoice reference. Determine the document kind from move_type instead. Regular invoices now use code 380 and credit notes code 381. Self-billed invoices and credit notes use codes 389 and 261 respectively. No Task id Forward-Port-Of: odoo/odoo#286526