-
Notifications
You must be signed in to change notification settings - Fork 106
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] shopinvader_search_engine: Fix categories into products #1480
[16.0][FIX] shopinvader_search_engine: Fix categories into products #1480
Conversation
lmignon
commented
Nov 30, 2023
•
edited
Loading
edited
- Improve perfs?
3bae618
to
c0fd942
Compare
@@ -16,3 +16,25 @@ def _filter_by_index(self): | |||
in rec.se_binding_ids.mapped("index_id").ids | |||
) | |||
return records | |||
|
|||
def _filter_by_bound_in_same_lang(self): |
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.
Could you please explain why, while working on a particular index, you would need to return records linked to another index (with the same backend and lang) ?
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.
when you serialize a product, you also serialize categories linked to the product. In this case, you're working with the product's index not the one from the category. If you add tests to check that the categories field is filled into the product information, you'll see that before this change it was always empty.
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.
There was a test, but it was wrong. I've corrected it (+ added one for the lang case).
I have also opened OCA/search-engine#177 to avoid such mistakes in the future.
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.
@lmignon ping
d6b8443
to
0812508
Compare
0812508
to
4efaa94
Compare
/ocabot merge patch |
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at 458b51a. Thanks a lot for contributing to shopinvader. ❤️ |