-
-
Notifications
You must be signed in to change notification settings - Fork 489
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
[10.0][ADD] website_sale_search_fuzzy. #169
[10.0][ADD] website_sale_search_fuzzy. #169
Conversation
* Adds fuzzy search to product names
trgm_mod = env['trgm.index'] | ||
|
||
if trgm_mod._trgm_extension_exists() != 'installed': | ||
raise UserError(_( |
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.
@lasley I'm doing env['trgm.index'].create({'field_id': prod_templ_name, 'index_type': 'gin'})
below here in this post init hook, adding the index to the product template name field.
I have a check here that ensures trgm is installed on postgres (used from base_search_fuzzy) before adding the index, however I don't think travis or runbot are configured to have it installed.
Is doing a post_init_hook the wrong way to go about it? Or not sure if some config files have to be edited to get trgm installed.
Perhaps doing the post_init_hook is correct and having a trgm check is unnecessary.
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.
If this logic is already included in base_search_fuzzy
, it is superfluous here because there is no way for this module to be installed without it.
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.
The function is used in base_search_fuzzy, however it seems the logic in the module only logs warnings if it isn't installed.
Seems like some tests are cancelled out if it isn't installed either.
https://github.com/OCA/server-tools/search?utf8=%E2%9C%93&q=_trgm_extension_exists&type=
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.
some nitpicking
website_sale_search_fuzzy/README.rst
Outdated
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
To contribute to this module, please visit http://odoo-community.org. |
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.
https
website_sale_search_fuzzy/README.rst
Outdated
|
||
Make sure to follow the installation instructions of base_search_fuzzy before | ||
installing this module. | ||
|
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.
A screenshot would be nice to have
please correct travis+runbot |
@BMW95 - dependency has been merged & RFC closed. |
31b3cfc
to
c34cdb2
Compare
* Move mock patch import location * Add https to odoo website in readme * Add link to base_search_fuzzy in readme * Add test to ensure index on product templ name
c34cdb2
to
c889713
Compare
@elicoidal thanks for the review. For the readme you requested a picture underneath the paragraph about the base_search_fuzzy instructions. Were you looking for a picture of the e-commerce view, or the base_search_fuzzy instructions? For the instructions, I added a link instead if that's okay :) Other than that, ready for review! |
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.
Minor comment in the hook, otherwise LGTM
Thanks @lasley :) |
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.
LGTM
website_sale_search_fuzzy/README.rst
Outdated
:alt: Try me on Runbot | ||
:target: https://runbot.odoo-community.org/runbot/113/10.0 | ||
|
||
Known Issues / Roadmap |
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 the section if empty
* Remove empty section headers
Updated |
Good for squash & merge? |
yup! |
Can a PSC do the squash/merge honors whenever they get a chance please and thanks! |
* [ADD] Add module website_sale_search_fuzzy. * Adds fuzzy search to product names * [IMP] website_sale_search_fuzzy: Fix readme, imports, add tests. * Move mock patch import location * Add https to odoo website in readme * Add link to base_search_fuzzy in readme * Add test to ensure index on product templ name * [ADD] Add server-tools to oca-dependencies. * [FIX] website_sale_search_fuzzy: Fix readme. * Remove empty section headers
Hi there,
This module adds a fuzzy search to product names for eCommerce purposes.
Depends
Resolves
Todo
Cheers,
Brett