-
-
Notifications
You must be signed in to change notification settings - Fork 270
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] product_variant_configurator: returning domains in onchange doesn't work anymore #337
[FIX] product_variant_configurator: returning domains in onchange doesn't work anymore #337
Conversation
f6dbc01
to
364269d
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.
Please fix pre-commit
for rec in self: | ||
if not rec.product_tmpl_id._origin: | ||
# no product template: allow any product | ||
rec.product_id_configurator_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.
rec.product_id_configurator_domain = [] | |
rec.product_id_configurator_domain = TRUE_DOMAIN |
from odoo.osv.expression
# no product template: allow any product | ||
rec.product_id_configurator_domain = [] | ||
else: | ||
domain, cont = product_obj._build_attributes_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.
domain, cont = product_obj._build_attributes_domain( | |
domain, _cont = product_obj._build_attributes_domain( |
Prefix unused variable with _
product = self.product_product.new( | ||
{"name": "Test product", "product_tmpl_id": self.product_template_yes.id} | ||
) | ||
product.product_tmpl_id = self.product_template_empty_yes | ||
res = product._onchange_product_tmpl_id_configurator() | ||
# res = product._onchange_product_tmpl_id_configurator() |
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.
Remove or restore commented code.
364269d
to
f3b4572
Compare
f3b4572
to
f0826c6
Compare
…sn't work anymore
f0826c6
to
c0cb2a2
Compare
/ocabot merge patch |
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at 329134e. Thanks a lot for contributing to OCA. ❤️ |
No description provided.