I am experiencing a rounding issue when Odoo imports Peppol vendor bills into Odoo 19.0 (Online). It appears that Odoo calculates the line totals manually rather than honoring the provided total in the XML file.
When importing an invoice with multiple lines (e.g. I have one with 21 lines), Odoo seems to ignore the <cbc:LineExtensionAmount> tag. Instead, it recalculates the line total using the <cbc:PriceAmount> (in this invoice it has 6 decimals) multiplied by the <cbc:InvoicedQuantity>
Because Odoo rounds these internal calculations per line, the final Invoice Total at the bottom deviates from the actual amount requested by the vendor. In my case, the LineExtensionAmount is the definitive amount to be paid, but Odoo overrides it.
<cac:InvoiceLine>
<cbc:InvoicedQuantity unitCode="DAY">80.12</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="EUR">10.98</cbc:LineExtensionAmount>
<cac:Price>
<cbc:PriceAmount currencyID="EUR">0.136986</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
Odoo makes the amount €11.22 instead of €10.98 (my XP doesn't allow posting an image of the interface yet)
The total of the invoice in Odoo is €59.79, in the XML the total is €61.12 (my XP doesn't allow posting an image of the interface yet)
Here is the total in the XML
<cac:LegalMonetaryTotal> <cbc:TaxInclusiveAmount currencyID="EUR">61.12</cbc:TaxInclusiveAmount> <cbc:PayableAmount currencyID="EUR">61.12</cbc:PayableAmount> </cac:LegalMonetaryTotal
I checked the lines and calculated the totals myself, the XML is correct, without rounding Odoo would show the correct amounts.