odoo/odoo#194594

Created by Abdelaziz EL HAYYANY (azey)
Closed
label
odoo-dev:17.0-opw-4471913-rounding_discrepancy_in_tax_computation-azey
head
9857c736ada1eefa7d7af015bb3c58db15b79f1f
odoo/odoo
16.0 #194594

[FIX] account: address product price rounding discrepancy in tax computation

The customer reported a rounding discrepancy in product price calculations. For instance, a product priced at 12,632.0160 with a 25% tax should result in a total of 15,790.02, but in Odoo versions 16 and 17, it incorrectly displays 15,790.03.

This issue occurs because tax calculations in versions 16 and 17 round intermediate tax amounts during computation. This behavior leads to slight inaccuracies in the final total.

In version 18, the tax computation has been updated to avoid rounding during intermediate steps, aligning with the product owner’s decision to calculate taxes without intermediate rounding. This ensures that the total amount reflects the exact tax computation.

This commit removes the rounding during intermediate steps in tax computation to align with the behavior introduced in version 18. It specifically addresses the rounding discrepancy issue without refactoring the entire tax computation logic, as that was already done in version 18.

opw-4471913


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr