Files
odoo_source/addons
Dylan Kiss (dyki) 5af3cfc2b9 [FIX] account_edi_ubl_cii: fix PriceAmount rounding
In [1], we added a rounding of the amounts in the `<PriceAmount>` tags
to avoid floating point rounding errors. However, it seems the
`float_round` function does not guarantee to avoid these errors.

Take the example of `price_subtotal` = 250.80 and `quantity` = 3.
We will compute the PriceAmount as 250.80 / 3 which yields
83.60000000000001. Even when using `float_round(amount, 10)`, it still
results in the same amount with the rounding error.

For that reason we use the built-in `round` method of Python instead.

[1] 58d57bbbaaab32ba0183890a9182e6de09b32ac5

closes odoo/odoo#156555

X-original-commit: 0b21d562fe4d315c01421b3f242e274830c34e79
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Dylan Kiss (dyki) <dyki@odoo.com>
2024-03-05 20:53:25 +00:00
..
2024-02-22 09:06:12 +00:00
2024-01-15 09:30:53 +00:00
2024-01-26 09:13:03 +00:00
2024-03-05 08:27:47 +00:00