Skip to content

Conversation

@serpentcs-dev1
Copy link
Member

@serpentcs-dev1 serpentcs-dev1 commented Dec 30, 2016

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:

@serpentcs-dev1
Copy link
Member Author

@jbeficent Could you please review?

})
res['arch'] = etree.tostring(doc)
return res

Copy link
Member

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


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
Copy link
Member

Choose a reason for hiding this comment

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

@JordiBForgeFlow
Copy link
Member

Depends on OCA/server-tools#675

serpentcs-dev1 and others added 3 commits January 10, 2017 14:50
Copy link
Member

@dreispt dreispt left a 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:]
Copy link
Member

Choose a reason for hiding this comment

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

2: or 1: ?

Copy link
Member Author

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
Copy link
Member

Choose a reason for hiding this comment

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

Black Magic! 😏

Copy link

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
Copy link
Member

Choose a reason for hiding this comment

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

This has alint warning

Copy link
Member Author

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.

@serpentcs-dev1
Copy link
Member Author

@jbeficent The above new commit will help to perform an advanced search for the operators in the Negative expression.

@rafaelbn rafaelbn added this to the 9.0 milestone Jan 17, 2017
Copy link
Member

@rafaelbn rafaelbn left a 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

@rafaelbn rafaelbn merged commit 8d5d7ae into OCA:9.0 Jan 17, 2017
@pedrobaeza
Copy link
Member

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.

SiesslPhillip pushed a commit to grueneerde/OCA-social that referenced this pull request Nov 20, 2024
Syncing from upstream OCA/social (11.0)
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.

8 participants