summaryrefslogtreecommitdiff
path: root/addons/website_sale_comparison
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2020-08-06 13:35:15 +0000
committerJorge Pinna Puissant <jpp@odoo.com>2020-08-12 13:42:20 +0000
commitebac669b2e1f2b71ce8b3ad9b277193c5e0db69f (patch)
tree5be2ed89454daef4fed1c126c3700dcbaf97d5b6 /addons/website_sale_comparison
parent9039183fbbd288800a8bf4166780f9f86cc61b52 (diff)
[FIX] account: tax rounding error
- Create Tax 0: Percentage Amount: 0 Tax Included Tax Group 0 - Create Tax 8: Percentage Amount: 8 Tax Included Tax Group 8 - Create a customer invoice with one line Quantity: 8.0 Price Unit: 15.55 Taxes: Tax 8, Tax 0 (order is important) The tax amounts are: Tax 8: 9.22 Tax 0: -0.01 If the taxes are inverted, the tax amounts Tax 8: 9.21 Tax 0: 0.00 The difference is due to the rounding of the 8% tax done differently. In the second case, the computation of the 8% tax goes through: https://github.com/odoo/odoo/blob/8c5cd335a57c20ed5faa6b7c7630c296c1f2a5cf/addons/account/models/account.py#L1480 In the first case, the amount is recomputed in: https://github.com/odoo/odoo/blob/8c5cd335a57c20ed5faa6b7c7630c296c1f2a5cf/addons/account/models/account.py#L1483 The rounding is different in both cases, leading to an inconsistency. When the tax amount is zero, there is no need to save the amount in `total_included_checkpoints`. opw-2306676 closes odoo/odoo#55812 X-original-commit: e2776e188070221ef465a864bd2cb8dcfc971e14 Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Diffstat (limited to 'addons/website_sale_comparison')
0 files changed, 0 insertions, 0 deletions