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
[FIX] 10.0 sale_triple_discount #979
Conversation
there are cases where the cache trick done in triple_discount_preprocess is lost when sale.order.line _compute_amount is called and processes the 1st line of the sale order => all remaining lines are impacted, and don't have the discounts 2 and 3 taken into account. Not updating the sale.order _amount_all method because it is unlikely that fields on the lines depend on the total amount of the sale.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems legit 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
This PR has the |
@lmignon This would be interesting for you |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sens. Fix after fix, these triple discount addons seems to be a nightmare. Shouldn't the overall design of these addons be redesigned? (But that may be impossible)
/ocabot merge patch |
On my way to merge this fine PR! |
Congratulations, your PR was merged at c8463e7. Thanks a lot for contributing to OCA. ❤️ |
there are cases where the cache trick done in triple_discount_preprocess
is lost when sale.order.line _compute_amount is called and processes the
1st line of the sale order => all remaining lines are impacted, and don't
have the discounts 2 and 3 taken into account.
Not updating the sale.order _amount_all method because it is unlikely that
fields on the lines depend on the total amount of the sale.