-
-
Notifications
You must be signed in to change notification settings - Fork 661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Account Invoice Triple Discount does not compute correctly price_subtotal #1240
Comments
Could you add in a PR a test that is failing ? |
Just added |
I have the same problem, even using only Odoo's default discount field and the problem is here
To calculate the taxes here the unit price with the aggregated discounts is computed, but when saving the value in the line Odoo rounds to the decimals by default and this produces an inaccuracy when calculating the taxes and the base especially when the line contains many units. |
There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
The module does not compute correctly the
price_subtotal
field because the price rounding feature.Module
account_invoice_triple_discount
Describe the bug
When the invoice has a price and a discount (just one discount can reproduce the issue) that produce a discounted price with more decimals than price rounding setting so the
price_subtotal
is wrong.To Reproduce
An example is:
qty price discount discount2 discount3 subtotal
9950 0.139 15% 0 0 1176.09
but the right subtotal is 1175.59 because 0.139 minus 15% is 0.11815 * 9950 = 1175.5925 -> Rounded = 1175.59.
Affected versions:
The text was updated successfully, but these errors were encountered: