-
-
Notifications
You must be signed in to change notification settings - Fork 474
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
[14.0][FIX] mrp_bom_attribute_match: avoid recursion in BOM. #1045
[14.0][FIX] mrp_bom_attribute_match: avoid recursion in BOM. #1045
Conversation
@ivantodorovich what do you think? |
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.
Is there also a python constraint?
This works well for the UI/UX, but it'd be nice to prevent it at the orm level
Similar to core's https://github.com/odoo/odoo/blob/e53f7ef1be9f7a1cc3fd47d30c4a688d95f10760/addons/mrp/models/mrp_bom.py#L90
6bb6f7f
to
53957c7
Compare
@@ -29,6 +31,18 @@ class MrpBomLine(models.Model): | |||
compute="_compute_product_uom_category_id", | |||
) | |||
|
|||
@api.constrains("component_template_id", "parent_product_tmpl_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.
@api.constrains("component_template_id", "parent_product_tmpl_id") | |
@api.constrains("component_template_id") |
To supress this log warning:
2023-06-06 07:20:16,529 250 WARNING odoo odoo.models: method mrp.bom.line._check_component_template_recursion: @constrains parameter 'parent_product_tmpl_id' is not writeable
53957c7
to
b31b023
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.
Functional OK!
This PR has the |
b31b023
to
d0f22df
Compare
d0f22df
to
2016a06
Compare
@pedrobaeza merge? we added 2 maintainers to be independent as we worked together with @ivantodorovich on this module |
/ocabot merge patch |
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at ade0ffb. Thanks a lot for contributing to OCA. ❤️ |
No description provided.