-
-
Notifications
You must be signed in to change notification settings - Fork 699
[9.0] [ADD] mail message name search #143
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
[9.0] [ADD] mail message name search #143
Conversation
|
@jbeficent Could you please review? |
| }) | ||
| res['arch'] = etree.tostring(doc) | ||
| return res | ||
|
|
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.
@darshan-serpent add an extra blank line here
mail_message_name_search/README.rst
Outdated
|
|
||
| This module depends on the module 'base_search_fuzzy' to ensure that | ||
| searches on emails are based on indexes. Please read carefully the install | ||
| instructions https://github.com/OCA/server-tools/blob/8.0/base_search_fuzzy/README.rst |
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.
|
Depends on OCA/server-tools#675 |
Introduce search of html fields Create indexes Update Readme
[IMP] search by email_from and reply_to
dreispt
left a comment
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 (let's wait for the CI checks)
| ('reply_to', operator, value)] | ||
|
|
||
| if operator in expression.NEGATIVE_TERM_OPERATORS: | ||
| domain = domain[2:] |
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.
2: or 1: ?
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.
I guess this code is not needed at all. Should we remove it?
| return res | ||
|
|
||
|
|
||
| models.BaseModel.fields_view_get = _custom_fields_view_get |
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.
Black Magic! 😏
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.
Hmmm won't this break database isolation?
| from openerp import api, fields, models | ||
| from lxml import etree | ||
| from openerp.osv import expression | ||
| from openerp.osv.orm import setup_modifiers |
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.
This has alint warning
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.
@dreispt The method is still there setup_modifiers in v9
And I cannot find any alternative for this. I guess we have to avoid this warning.
|
@jbeficent The above new commit will help to perform an advanced search for the operators in the Negative expression. |
rafaelbn
left a comment
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.
Tested in runbot 👍 super! Very useful
|
Now that I see the module, the monkey-patching you are making will fail if the module is present in addons path but not installed, as Python always monkey-patch. You must make the monkey-patching in _register_hook method, and there's already a method in Odoo for doing such task. Please rectify this in another PR. |
Syncing from upstream OCA/social (11.0)
Mail message name search
This module adds the capability to search for mail messages by subject or
body of the message. This will be useful in models that make intense use of
messages, like project issues or helpdesk tickets.
This module will add dynamically the message_ids to the search view of
any model that inherits from the mail.thread and will incorporate the
capability to search for content in the mail messages.
Installation
This module depends on the module 'base_search_fuzzy' to ensure that
searches on emails are based on indexes. Please read carefully the install
instructions https://github.com/OCA/server-tools/blob/8.0/base_search_fuzzy/README.rst
This module installs by default the indexes that are required to
perform the searches on mail messages.
Depends on: