Monday, May 4, 2026
2 changes · saas-18.2
Resolved issues and error corrections
This fix ensures quantities are rounded normally when no unit conversion is needed. It prevents tiny decimal discrepancies from turning an expected quantity, such as 6, into an incorrect billed quantity like 6.01 during OCR-based vendor bill matching.
Original PR description
This function is meant to compute the quantity from one UoM to another UoM, the rounding method parameter is meant to be used in that context. If both UoM are the same, it should use the usual…
This function is meant to compute the quantity from one UoM to another UoM, the rounding method parameter is meant to be used in that context. If both UoM are the same, it should use the usual HALF-UP rounding method. Explanations regarding the bug occurring in the related ticket: - The OCR was matching a purchase order for which one of the lines had a quantity of exactly 6. - When this PO was matched and imported on the vendor bill, the quantity of the related invoice line was rounded to 6.00000000000001. Under normal circumstances, the value would have stayed at 6 after rounding, but because the OCR runs within the context of a `_disable_discount_precision`, this kind of rounding discrepancy is possible. - The billed quantity is then computed based on the quantity on the invoice line, 6.00000000000001. As it is rounded upwards to the nearest two decimals places, the final value is 6.01 instead of the expected 6. opw-[6113387](https://www.odoo.com/odoo/my-support-tasks/6113387) Forward-Port-Of: odoo/odoo#259926
This update adjusts an automated test for electronic invoice imports to better reflect a real user workflow. It helps ensure that after importing, grouping, and posting an invoice, users can still ungroup lines on the next imported invoice as expected.
Original PR description
[FIX] account_edi_ubl_cii: fix group lines test Fix the test `test_import_invoice_group_lines_by_tax` to cover the case where an invoice was imported, grouped and posted, the next one will be grouped but the user still can ungroup lines up to 18.3, an other PR will be opened for 18.4+ no-task Forward-Port-Of: odoo/odoo#261731