-
-
Notifications
You must be signed in to change notification settings - Fork 493
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
[IMP] website_sale_product_assortment #975
base: 16.0
Are you sure you want to change the base?
[IMP] website_sale_product_assortment #975
Conversation
Hi @CarlosRoca13, |
ef4cf6f
to
f58223c
Compare
3fb2022
to
a249a20
Compare
no_restriction_assortments = any( | ||
assortment.website_availability == "no_show" for assortment in assortments | ||
) | ||
|
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.
Please remove extra empty lines inside a method.
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.
Done! Thanks for the correction
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.
Thank you so much! please remove all the extra empty lines
assortment_restriction = False | ||
allowed_product_ids = set() | ||
|
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.
|
||
if not no_restriction_assortments: | ||
return allowed_product_ids, assortment_restriction | ||
|
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.
"|", | ||
("website_ids", "=", website.id), | ||
("website_ids", "=", False), | ||
] | ||
) | ||
) | ||
assortment_dict = {} | ||
partner_assortments = self.env["ir.filters"].sudo() | ||
|
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.
if assortment.website_availability != "no_restriction": | ||
partner_assortments |= assortment | ||
allowed_product_ids.update(assortment.all_product_ids.ids) | ||
|
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.
And if you can, add a test to check that is working OK on future migrations 😄 |
2abb8e5
to
60bc3f6
Compare
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! 😄
Ups! the whitespaces still there... |
60bc3f6
to
a60663d
Compare
… products * Methods that calculate product availability based on e-commerce assortments are being corrected to make them compatible.
a60663d
to
efbb7a1
Compare
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.
👍
Done! I was doing the rebase, thanks! |
This PR has the |
Description:
When more than one assortment is applied to the customer on e-commerce, the functionality doesn't work correctly, and the configurations are not applied properly, for example, when combining "no restriction" with "no show" or "no purchase."
This PR is essential for the functionality of this module because the products are not shown or cannot be bought when they should.
Cases covered with this improvement:
Solution:
To resolve this problem, we have made the following modifications: