-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
[16.0][FIX] website_sale_product_pack: compute pack quantities #184
base: 16.0
Are you sure you want to change the base?
Conversation
Hi @ernestotejeda, |
Hello @pedrobaeza @victoralmau |
This must be handled in |
ok i understand, but I don't know if the problem has its origin on the website. following the method _compute_quantities_dict the pack components return 0, and do not compute quantities correctly About the pack I use non detailed (2nd img) |
2a2e570
to
0b585e6
Compare
0b585e6
to
a01c8b8
Compare
Hi @pedrobaeza i moved code to website_sale_product_pack. |
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.
Thanks for the changes, and sorry for not being very clear. I was expecting that you avoid the _compute_quantities_dict
override, as that one is very general, but to focus on the website_sale checkout process itself, and bypass the stock checking just there on the met conditions. If the availability problem happens in other places, then it would be correct to put it on the main stock module, but then you should rephrase your rationale in the commit/PR message about how to reproduce it in a generic way (and maybe making reference that this happens also on e-commerce).
Hi @pedrobaeza I was analyzing the issue in depth and following the call stack, I noticed that the compute_dict_qty method is called on the following line (link), so i should inherit the _get_cart_and_free_qty method. Let me know your opinion! |
|
Then it seems we need a |
Hi @pedrobaeza Also happens in the backend... but by default is not blocking the possibility of confirming a sale order |
Compute quantities for packs:
The error:
Could not finish a checkout process on website due to stock restriction
Reproduce error:
Create a pack.
Set pack as storable product, and set out of stock continue selling in FALSE
Make sure you have stock of pack lines.
Go to website and buy the pack
Try to finish the checkout process and you have the error
Also with this PR we ensure not to over-sell packs discriminating outgoing quantity in available quantity (line 37)