Skip to content
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

[V16.0] sale_discount_display_amount: Wrong discount total calculation on discount included amounts #2813

Open
PieterPaulussen opened this issue Nov 27, 2023 · 1 comment

Comments

@PieterPaulussen
Copy link
Contributor

Source: https://github.com/OCA/sale-workflow/blob/50f5707635f93a8b5868e20bbee1726c4063bb9c/sale_discount_display_amount/models/sale_order_line.py#L40C46-L40C60

The implementation of this seems off. Are discounts not always calculated on the amount excluding VAT?

@PieterPaulussen PieterPaulussen changed the title Wrong discount total calculation on discount included amounts [V16.0] sale_discount_display_amount: Wrong discount total calculation on discount included amounts Nov 27, 2023
@Atteqany
Copy link

You are right. wrong calculation.
Odoo makes the % discount before adding the TAX, but this module calculate the %discount on the amount which includes the TAX

For example: Sale order for a product with a price 100 and 10% discount, Odoo wrote the subtotal 90
So the value of the 10% discount is only 10 because all this are before applying the TAX
but this module made the 10% discount value is 11.50, which means it calculated wrong.
Now, the discount amount which the module display is more than the actual which Odoo counted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants