Skip to content
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] sale_channel_search_engine: Prevent MRO conflicts on registry load #12

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

lmignon
Copy link
Collaborator

@lmignon lmignon commented Oct 9, 2023

Avoid to create a new base model for product.product and product.category on top of the se.indexable.record model. Others addon could extends the product.product and product.category models to make it extendable. If such modules are mixed with an addon where defining a custome base class for the same models and inheriting from se.indexable.record, this will lead to an MRO conflict error when the odoo registry is initialized. This is the case for exemple when the ale_channel_search_engine_product and sale_channel_search_engine_category modules were used with the shopinvader_search_enfine module

Avoid to create a new base model for product.product and product.category on top of the se.indexable.record model. Others addon could extends the product.product and product.category models to make it extendable. If such modules are mixed with an addon where defining a custome base class for the same models and inheriting from se.indexable.record, this will lead to an MRO conflict error when the odoo registry is initialized. This is the case for exemple when the ale_channel_search_engine_product and sale_channel_search_engine_category modules were used with the shopinvader_search_enfine module
@lmignon lmignon marked this pull request as ready for review October 9, 2023 14:46
@lmignon
Copy link
Collaborator Author

lmignon commented Oct 9, 2023

Copy link
Contributor

@hparfr hparfr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code read, lgtm

@lmignon
Copy link
Collaborator Author

lmignon commented Oct 10, 2023

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 16.0-ocabot-merge-pr-12-by-lmignon-bump-minor, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 8b10796 into OCA:16.0 Oct 10, 2023
5 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at fa207f5. Thanks a lot for contributing to OCA. ❤️

@lmignon lmignon deleted the 16.0-avoif-mro-conflict branch October 10, 2023 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants