Thursday, May 28, 2026
2 changes · 19.0
Enhancements to existing features
This change adds a safe customization point for how small rounding differences are handled on invoices with tax excluded from prices. Standard behavior stays the same, while country-specific accounting rules can keep product line subtotals aligned with their accounting balances when required.
Original PR description
## Context Forward-port to `19.0` of #266748 (proposal 1/2). Follow-up to issue #266745. opw-6177008 **Default behavior unchanged** (`True` returned). The hook is meant to be overridden in localizations where the contractual truth is the HT per line (typical B2B accounting in France, Belgium, etc.), preserving `price_subtotal == balance` on every product line. A mirror JS helper `should_distribute_base_delta_for_excluded_mode` is added in `addons/account/static/src/helpers/account_tax.js` to keep python/js consistent. ## Why See #266745 for the full reasoning, numeric example and full anonymized real-world invoice (109 lines). Staging validation: 22 lines with `price_subtotal ≠ balance` without fix → 0 mismatches on 1,175 lines with fix. This PR is **non-breaking**: it just exposes a clean override point. A companion PR provides the override for `l10n_fr_account`. _Closed — forward-port will be auto-created by Odoo CI bot after #266748 is merged._
Users sending invoices through Peppol now receive a more precise message when a customer is missing the required Peppol identifier. This reduces confusion by naming the exact missing field instead of incorrectly suggesting the VAT number is absent.
Original PR description
When a user sends a move via Peppol to a customer that has a VAT number set but not a Peppol endpoint, we show the user a generic error ("no VAT").
This makes the user confused, as he already filled the VAT field of his customer, It's the Peppol VAT that is missing (it could be: Belgian Company Registry, France SIRET, ...etc, depending on the customer's country)
This PR makes the error message more accurate by showing exactly the missing required field.
task-5499707
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#263685
Forward-Port-Of: odoo/odoo#245915