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

[FIX] attribute_set_completeness: speed up completion fields #45

Merged
merged 1 commit into from
Sep 28, 2020

Conversation

Cedric-Pigeon
Copy link

As completion fields are used a lot for searches purposes, we need to store them in the database to speed up results.
As we can not simply use store=True because the depends fields are variable and dynamically defined on the attribute_set, this PR aims to use en event listener at each write/create

@rousseldenis rousseldenis mentioned this pull request Jul 7, 2020
11 tasks
@Cedric-Pigeon Cedric-Pigeon force-pushed the 10.0-completeness-speed branch 2 times, most recently from 5aed120 to 54a4bac Compare July 7, 2020 19:29
@Cedric-Pigeon
Copy link
Author

/ocabot merge minor

@shopinvader-git-bot
Copy link

This PR looks fantastic, let's merge it!
Prepared branch 10.0-ocabot-merge-pr-45-by-Cedric-Pigeon-bump-minor, awaiting test results.

@shopinvader-git-bot
Copy link

Congratulations, your PR was merged at 71772f0. Thanks a lot for contributing to shopinvader. ❤️

from odoo.addons.component_event import skip_if


class AttributeSetOwnerEventListener(AbstractComponent):
Copy link
Contributor

Choose a reason for hiding this comment

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

@Cedric-Pigeon in this case a simple override of write would have been enough IMO :)

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.

None yet

3 participants