-
-
Notifications
You must be signed in to change notification settings - Fork 689
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
[13.0][MIG] product_assortment #517
Conversation
cbbc45a
to
af2a26f
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.
Code review + functional tests
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.
Code review
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.
Hi.
Thanks for porting this module. Some minor remarks inline. The rest LGTM for me. Code review / no test.
BTW, I'm just discovering this module. i think it is great, but should be more generic. This feature is interesting for product, but could be also implemented for partners, or any other model.
A more abstract module, in server-ux could be interesting.
not a blocking point, just sharing my pov.
kind regards.
from odoo.osv import expression | ||
|
||
|
||
class ProductAssortment(models.Model): |
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.
class IrFilters(models.Model):
is_assortment = fields.Boolean(default=lambda x: x._get_default_is_assortment()) | ||
|
||
def _get_eval_domain(self): | ||
res = super(ProductAssortment, self)._get_eval_domain() |
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.
res = super()._get_eval_domain()
def _get_action_domain(self, action_id=None): | ||
# tricky way to act on get_filter method to prevent returning | ||
# assortment in search view filters | ||
domain = super(ProductAssortment, self)._get_action_domain(action_id=action_id) |
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.
domain = super()._get_action_domain(action_id=action_id)
if self.env.context.get("product_assortment", False): | ||
model = self.env.ref("product.model_product_product") | ||
return model.model | ||
return "" |
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.
return False
af2a26f
to
cf9ae9c
Compare
@OCA/product-maintainers This one is ready to merge. Thank you! |
1 similar comment
@OCA/product-maintainers This one is ready to merge. Thank you! |
@legalsylvain This one is ready to merge... |
/ocabot merge |
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at 4b5c22b. Thanks a lot for contributing to OCA. ❤️ |
No description provided.