odoo-addon-mail-message-search 16.0.1.0.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- odoo/addons/mail_message_search/README.rst +118 -0
- odoo/addons/mail_message_search/__init__.py +1 -0
- odoo/addons/mail_message_search/__manifest__.py +12 -0
- odoo/addons/mail_message_search/i18n/mail_message_search.pot +81 -0
- odoo/addons/mail_message_search/models/__init__.py +1 -0
- odoo/addons/mail_message_search/models/mail_thread.py +60 -0
- odoo/addons/mail_message_search/readme/CONTEXT.md +10 -0
- odoo/addons/mail_message_search/readme/CONTRIBUTORS.md +3 -0
- odoo/addons/mail_message_search/readme/DESCRIPTION.md +6 -0
- odoo/addons/mail_message_search/readme/USAGE.md +2 -0
- odoo/addons/mail_message_search/static/description/icon.png +0 -0
- odoo/addons/mail_message_search/static/description/index.html +454 -0
- odoo/addons/mail_message_search/tests/__init__.py +1 -0
- odoo/addons/mail_message_search/tests/test_mail_message_search.py +43 -0
- odoo_addon_mail_message_search-16.0.1.0.0.2.dist-info/METADATA +133 -0
- odoo_addon_mail_message_search-16.0.1.0.0.2.dist-info/RECORD +18 -0
- odoo_addon_mail_message_search-16.0.1.0.0.2.dist-info/WHEEL +5 -0
- odoo_addon_mail_message_search-16.0.1.0.0.2.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
===================
|
|
2
|
+
Mail Message Search
|
|
3
|
+
===================
|
|
4
|
+
|
|
5
|
+
..
|
|
6
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
7
|
+
!! This file is generated by oca-gen-addon-readme !!
|
|
8
|
+
!! changes will be overwritten. !!
|
|
9
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
10
|
+
!! source digest: sha256:e276b9738477253e4d9e296f1f4b18c589c12bc22463090e31cb188ce2aaba2b
|
|
11
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
12
|
+
|
|
13
|
+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
14
|
+
:target: https://odoo-community.org/page/development-status
|
|
15
|
+
:alt: Beta
|
|
16
|
+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
|
|
17
|
+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
|
18
|
+
:alt: License: AGPL-3
|
|
19
|
+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github
|
|
20
|
+
:target: https://github.com/OCA/social/tree/16.0/mail_message_search
|
|
21
|
+
:alt: OCA/social
|
|
22
|
+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
|
23
|
+
:target: https://translation.odoo-community.org/projects/social-16-0/social-16-0-mail_message_search
|
|
24
|
+
:alt: Translate me on Weblate
|
|
25
|
+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
|
26
|
+
:target: https://runboat.odoo-community.org/builds?repo=OCA/social&target_branch=16.0
|
|
27
|
+
:alt: Try me on Runboat
|
|
28
|
+
|
|
29
|
+
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|
30
|
+
|
|
31
|
+
This module enables searching for messages across any record that uses
|
|
32
|
+
the chatter, based on their associated conversation threads. It
|
|
33
|
+
dynamically adds a Message Search field to the search view of any model
|
|
34
|
+
that inherits from ``mail.thread``.
|
|
35
|
+
|
|
36
|
+
The Message Search field performs a smart, per-word search across a
|
|
37
|
+
message’s subject, body, sender, and reply-to fields.
|
|
38
|
+
|
|
39
|
+
**Table of contents**
|
|
40
|
+
|
|
41
|
+
.. contents::
|
|
42
|
+
:local:
|
|
43
|
+
|
|
44
|
+
Use Cases / Context
|
|
45
|
+
===================
|
|
46
|
+
|
|
47
|
+
This module offers an alternative to ``base_search_mail_content``,
|
|
48
|
+
designed to better support languages that do not separate words with
|
|
49
|
+
spaces (e.g., Chinese, Japanese, Korean, Thai).
|
|
50
|
+
|
|
51
|
+
The original module relies on PostgreSQL's ``pg_trgm``, which requires
|
|
52
|
+
three-character tokens and a similarity score above the default
|
|
53
|
+
cutoff—making it ineffective for languages without space-separated
|
|
54
|
+
words.
|
|
55
|
+
|
|
56
|
+
This module uses direct keyword matching across key fields in
|
|
57
|
+
``mail.message``, offering more reliable results in multilingual
|
|
58
|
+
environments.
|
|
59
|
+
|
|
60
|
+
Usage
|
|
61
|
+
=====
|
|
62
|
+
|
|
63
|
+
Go to any model that contains a chatter (e.g. Contacts, ...). Search for
|
|
64
|
+
content in field 'Message Search'.
|
|
65
|
+
|
|
66
|
+
Bug Tracker
|
|
67
|
+
===========
|
|
68
|
+
|
|
69
|
+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/social/issues>`_.
|
|
70
|
+
In case of trouble, please check there if your issue has already been reported.
|
|
71
|
+
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
72
|
+
`feedback <https://github.com/OCA/social/issues/new?body=module:%20mail_message_search%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
|
73
|
+
|
|
74
|
+
Do not contact contributors directly about support or help with technical issues.
|
|
75
|
+
|
|
76
|
+
Credits
|
|
77
|
+
=======
|
|
78
|
+
|
|
79
|
+
Authors
|
|
80
|
+
-------
|
|
81
|
+
|
|
82
|
+
* Quartile
|
|
83
|
+
|
|
84
|
+
Contributors
|
|
85
|
+
------------
|
|
86
|
+
|
|
87
|
+
- `Quartile <https://www.quartile.co>`__:
|
|
88
|
+
|
|
89
|
+
- Aung Ko Ko Lin
|
|
90
|
+
- Yoshi Tashiro
|
|
91
|
+
|
|
92
|
+
Maintainers
|
|
93
|
+
-----------
|
|
94
|
+
|
|
95
|
+
This module is maintained by the OCA.
|
|
96
|
+
|
|
97
|
+
.. image:: https://odoo-community.org/logo.png
|
|
98
|
+
:alt: Odoo Community Association
|
|
99
|
+
:target: https://odoo-community.org
|
|
100
|
+
|
|
101
|
+
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
102
|
+
mission is to support the collaborative development of Odoo features and
|
|
103
|
+
promote its widespread use.
|
|
104
|
+
|
|
105
|
+
.. |maintainer-yostashiro| image:: https://github.com/yostashiro.png?size=40px
|
|
106
|
+
:target: https://github.com/yostashiro
|
|
107
|
+
:alt: yostashiro
|
|
108
|
+
.. |maintainer-aungkokolin1997| image:: https://github.com/aungkokolin1997.png?size=40px
|
|
109
|
+
:target: https://github.com/aungkokolin1997
|
|
110
|
+
:alt: aungkokolin1997
|
|
111
|
+
|
|
112
|
+
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
|
|
113
|
+
|
|
114
|
+
|maintainer-yostashiro| |maintainer-aungkokolin1997|
|
|
115
|
+
|
|
116
|
+
This module is part of the `OCA/social <https://github.com/OCA/social/tree/16.0/mail_message_search>`_ project on GitHub.
|
|
117
|
+
|
|
118
|
+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from . import models
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Copyright 2025 Quartile (https://www.quartile.co)
|
|
2
|
+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
3
|
+
{
|
|
4
|
+
"name": "Mail Message Search",
|
|
5
|
+
"version": "16.0.1.0.0",
|
|
6
|
+
"author": "Quartile, Odoo Community Association (OCA)",
|
|
7
|
+
"website": "https://github.com/OCA/social",
|
|
8
|
+
"depends": ["mail"],
|
|
9
|
+
"license": "AGPL-3",
|
|
10
|
+
"maintainers": ["yostashiro", "aungkokolin1997"],
|
|
11
|
+
"installable": True,
|
|
12
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Translation of Odoo Server.
|
|
2
|
+
# This file contains the translation of the following modules:
|
|
3
|
+
# * mail_message_search
|
|
4
|
+
#
|
|
5
|
+
msgid ""
|
|
6
|
+
msgstr ""
|
|
7
|
+
"Project-Id-Version: Odoo Server 16.0\n"
|
|
8
|
+
"Report-Msgid-Bugs-To: \n"
|
|
9
|
+
"Last-Translator: \n"
|
|
10
|
+
"Language-Team: \n"
|
|
11
|
+
"MIME-Version: 1.0\n"
|
|
12
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
13
|
+
"Content-Transfer-Encoding: \n"
|
|
14
|
+
"Plural-Forms: \n"
|
|
15
|
+
|
|
16
|
+
#. module: mail_message_search
|
|
17
|
+
#: model:ir.model,name:mail_message_search.model_mail_thread
|
|
18
|
+
msgid "Email Thread"
|
|
19
|
+
msgstr ""
|
|
20
|
+
|
|
21
|
+
#. module: mail_message_search
|
|
22
|
+
#: model:ir.model.fields,field_description:mail_message_search.field_account_account__message_search
|
|
23
|
+
#: model:ir.model.fields,field_description:mail_message_search.field_account_account_template__message_search
|
|
24
|
+
#: model:ir.model.fields,field_description:mail_message_search.field_account_analytic_account__message_search
|
|
25
|
+
#: model:ir.model.fields,field_description:mail_message_search.field_account_bank_statement_line__message_search
|
|
26
|
+
#: model:ir.model.fields,field_description:mail_message_search.field_account_journal__message_search
|
|
27
|
+
#: model:ir.model.fields,field_description:mail_message_search.field_account_move__message_search
|
|
28
|
+
#: model:ir.model.fields,field_description:mail_message_search.field_account_payment__message_search
|
|
29
|
+
#: model:ir.model.fields,field_description:mail_message_search.field_account_reconcile_model__message_search
|
|
30
|
+
#: model:ir.model.fields,field_description:mail_message_search.field_account_setup_bank_manual_config__message_search
|
|
31
|
+
#: model:ir.model.fields,field_description:mail_message_search.field_calendar_event__message_search
|
|
32
|
+
#: model:ir.model.fields,field_description:mail_message_search.field_event_event__message_search
|
|
33
|
+
#: model:ir.model.fields,field_description:mail_message_search.field_event_registration__message_search
|
|
34
|
+
#: model:ir.model.fields,field_description:mail_message_search.field_mail_blacklist__message_search
|
|
35
|
+
#: model:ir.model.fields,field_description:mail_message_search.field_mail_channel__message_search
|
|
36
|
+
#: model:ir.model.fields,field_description:mail_message_search.field_mail_thread__message_search
|
|
37
|
+
#: model:ir.model.fields,field_description:mail_message_search.field_mail_thread_blacklist__message_search
|
|
38
|
+
#: model:ir.model.fields,field_description:mail_message_search.field_mail_thread_cc__message_search
|
|
39
|
+
#: model:ir.model.fields,field_description:mail_message_search.field_mail_thread_phone__message_search
|
|
40
|
+
#: model:ir.model.fields,field_description:mail_message_search.field_mailing_contact__message_search
|
|
41
|
+
#: model:ir.model.fields,field_description:mail_message_search.field_mailing_mailing__message_search
|
|
42
|
+
#: model:ir.model.fields,field_description:mail_message_search.field_phone_blacklist__message_search
|
|
43
|
+
#: model:ir.model.fields,field_description:mail_message_search.field_product_product__message_search
|
|
44
|
+
#: model:ir.model.fields,field_description:mail_message_search.field_product_template__message_search
|
|
45
|
+
#: model:ir.model.fields,field_description:mail_message_search.field_res_company__message_search
|
|
46
|
+
#: model:ir.model.fields,field_description:mail_message_search.field_res_partner__message_search
|
|
47
|
+
#: model:ir.model.fields,field_description:mail_message_search.field_res_partner_bank__message_search
|
|
48
|
+
#: model:ir.model.fields,field_description:mail_message_search.field_res_users__message_search
|
|
49
|
+
msgid "Message Search"
|
|
50
|
+
msgstr ""
|
|
51
|
+
|
|
52
|
+
#. module: mail_message_search
|
|
53
|
+
#: model:ir.model.fields,help:mail_message_search.field_account_account__message_search
|
|
54
|
+
#: model:ir.model.fields,help:mail_message_search.field_account_account_template__message_search
|
|
55
|
+
#: model:ir.model.fields,help:mail_message_search.field_account_analytic_account__message_search
|
|
56
|
+
#: model:ir.model.fields,help:mail_message_search.field_account_bank_statement_line__message_search
|
|
57
|
+
#: model:ir.model.fields,help:mail_message_search.field_account_journal__message_search
|
|
58
|
+
#: model:ir.model.fields,help:mail_message_search.field_account_move__message_search
|
|
59
|
+
#: model:ir.model.fields,help:mail_message_search.field_account_payment__message_search
|
|
60
|
+
#: model:ir.model.fields,help:mail_message_search.field_account_reconcile_model__message_search
|
|
61
|
+
#: model:ir.model.fields,help:mail_message_search.field_account_setup_bank_manual_config__message_search
|
|
62
|
+
#: model:ir.model.fields,help:mail_message_search.field_calendar_event__message_search
|
|
63
|
+
#: model:ir.model.fields,help:mail_message_search.field_event_event__message_search
|
|
64
|
+
#: model:ir.model.fields,help:mail_message_search.field_event_registration__message_search
|
|
65
|
+
#: model:ir.model.fields,help:mail_message_search.field_mail_blacklist__message_search
|
|
66
|
+
#: model:ir.model.fields,help:mail_message_search.field_mail_channel__message_search
|
|
67
|
+
#: model:ir.model.fields,help:mail_message_search.field_mail_thread__message_search
|
|
68
|
+
#: model:ir.model.fields,help:mail_message_search.field_mail_thread_blacklist__message_search
|
|
69
|
+
#: model:ir.model.fields,help:mail_message_search.field_mail_thread_cc__message_search
|
|
70
|
+
#: model:ir.model.fields,help:mail_message_search.field_mail_thread_phone__message_search
|
|
71
|
+
#: model:ir.model.fields,help:mail_message_search.field_mailing_contact__message_search
|
|
72
|
+
#: model:ir.model.fields,help:mail_message_search.field_mailing_mailing__message_search
|
|
73
|
+
#: model:ir.model.fields,help:mail_message_search.field_phone_blacklist__message_search
|
|
74
|
+
#: model:ir.model.fields,help:mail_message_search.field_product_product__message_search
|
|
75
|
+
#: model:ir.model.fields,help:mail_message_search.field_product_template__message_search
|
|
76
|
+
#: model:ir.model.fields,help:mail_message_search.field_res_company__message_search
|
|
77
|
+
#: model:ir.model.fields,help:mail_message_search.field_res_partner__message_search
|
|
78
|
+
#: model:ir.model.fields,help:mail_message_search.field_res_partner_bank__message_search
|
|
79
|
+
#: model:ir.model.fields,help:mail_message_search.field_res_users__message_search
|
|
80
|
+
msgid "Message search, to be used only in searches"
|
|
81
|
+
msgstr ""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from . import mail_thread
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Copyright 2016-17 ForgeFlow S.L.
|
|
2
|
+
# (http://www.forgeflow.com)
|
|
3
|
+
# Copyright 2016 Serpent Consulting Services Pvt. Ltd.
|
|
4
|
+
# (<http://www.serpentcs.com>)
|
|
5
|
+
# Copyright 2025 Quartile (https://www.quartile.co)
|
|
6
|
+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
7
|
+
|
|
8
|
+
from lxml import etree
|
|
9
|
+
|
|
10
|
+
from odoo import api, fields, models
|
|
11
|
+
from odoo.osv import expression
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class MailThread(models.AbstractModel):
|
|
15
|
+
_inherit = "mail.thread"
|
|
16
|
+
|
|
17
|
+
def _search_message_search(self, operator, value):
|
|
18
|
+
fields = ["record_name", "subject", "body", "email_from", "reply_to"]
|
|
19
|
+
words = value.split()
|
|
20
|
+
word_domain_list = []
|
|
21
|
+
for word in words:
|
|
22
|
+
field_domain_list = [[(field, operator, word)] for field in fields]
|
|
23
|
+
if operator in expression.NEGATIVE_TERM_OPERATORS:
|
|
24
|
+
word_domain_list.append(expression.AND(field_domain_list))
|
|
25
|
+
else:
|
|
26
|
+
word_domain_list.append(expression.OR(field_domain_list))
|
|
27
|
+
word_domain = expression.AND(word_domain_list)
|
|
28
|
+
domain = expression.AND([[("model", "=", self._name)], word_domain])
|
|
29
|
+
messages = self.env["mail.message"].search(domain)
|
|
30
|
+
return [("id", "in", messages.mapped("res_id"))]
|
|
31
|
+
|
|
32
|
+
message_search = fields.Text(
|
|
33
|
+
help="Message search, to be used only in searches",
|
|
34
|
+
compute="_compute_message_search",
|
|
35
|
+
search="_search_message_search",
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
def _compute_message_search(self):
|
|
39
|
+
# Always assign a value to avoid CacheMiss errors
|
|
40
|
+
self.message_search = False
|
|
41
|
+
|
|
42
|
+
@api.model
|
|
43
|
+
def get_view(self, view_id=None, view_type="form", **options):
|
|
44
|
+
"""
|
|
45
|
+
Override to add message_search field in all the objects
|
|
46
|
+
that inherits mail.thread
|
|
47
|
+
"""
|
|
48
|
+
res = super().get_view(view_id=view_id, view_type=view_type, options=options)
|
|
49
|
+
if (
|
|
50
|
+
view_type == "search"
|
|
51
|
+
and self._fields.get("message_search")
|
|
52
|
+
and self.env.user.has_group("base.group_user")
|
|
53
|
+
):
|
|
54
|
+
doc = etree.XML(res["arch"])
|
|
55
|
+
for node in doc.xpath("/search/field[last()]"):
|
|
56
|
+
# Add message_search in search view
|
|
57
|
+
elem = etree.Element("field", {"name": "message_search"})
|
|
58
|
+
node.addnext(elem)
|
|
59
|
+
res["arch"] = etree.tostring(doc)
|
|
60
|
+
return res
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
This module offers an alternative to `base_search_mail_content`, designed to better
|
|
2
|
+
support languages that do not separate words with spaces (e.g., Chinese, Japanese,
|
|
3
|
+
Korean, Thai).
|
|
4
|
+
|
|
5
|
+
The original module relies on PostgreSQL's `pg_trgm`, which requires three-character
|
|
6
|
+
tokens and a similarity score above the default cutoff—making it ineffective for
|
|
7
|
+
languages without space-separated words.
|
|
8
|
+
|
|
9
|
+
This module uses direct keyword matching across key fields in `mail.message`, offering
|
|
10
|
+
more reliable results in multilingual environments.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
This module enables searching for messages across any record that uses the chatter,
|
|
2
|
+
based on their associated conversation threads. It dynamically adds a Message Search
|
|
3
|
+
field to the search view of any model that inherits from `mail.thread`.
|
|
4
|
+
|
|
5
|
+
The Message Search field performs a smart, per-word search across a message’s subject,
|
|
6
|
+
body, sender, and reply-to fields.
|
|
Binary file
|
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
5
|
+
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
|
|
6
|
+
<title>Mail Message Search</title>
|
|
7
|
+
<style type="text/css">
|
|
8
|
+
|
|
9
|
+
/*
|
|
10
|
+
:Author: David Goodger (goodger@python.org)
|
|
11
|
+
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
|
|
12
|
+
:Copyright: This stylesheet has been placed in the public domain.
|
|
13
|
+
|
|
14
|
+
Default cascading style sheet for the HTML output of Docutils.
|
|
15
|
+
Despite the name, some widely supported CSS2 features are used.
|
|
16
|
+
|
|
17
|
+
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
|
18
|
+
customize this style sheet.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/* used to remove borders from tables and images */
|
|
22
|
+
.borderless, table.borderless td, table.borderless th {
|
|
23
|
+
border: 0 }
|
|
24
|
+
|
|
25
|
+
table.borderless td, table.borderless th {
|
|
26
|
+
/* Override padding for "table.docutils td" with "! important".
|
|
27
|
+
The right padding separates the table cells. */
|
|
28
|
+
padding: 0 0.5em 0 0 ! important }
|
|
29
|
+
|
|
30
|
+
.first {
|
|
31
|
+
/* Override more specific margin styles with "! important". */
|
|
32
|
+
margin-top: 0 ! important }
|
|
33
|
+
|
|
34
|
+
.last, .with-subtitle {
|
|
35
|
+
margin-bottom: 0 ! important }
|
|
36
|
+
|
|
37
|
+
.hidden {
|
|
38
|
+
display: none }
|
|
39
|
+
|
|
40
|
+
.subscript {
|
|
41
|
+
vertical-align: sub;
|
|
42
|
+
font-size: smaller }
|
|
43
|
+
|
|
44
|
+
.superscript {
|
|
45
|
+
vertical-align: super;
|
|
46
|
+
font-size: smaller }
|
|
47
|
+
|
|
48
|
+
a.toc-backref {
|
|
49
|
+
text-decoration: none ;
|
|
50
|
+
color: black }
|
|
51
|
+
|
|
52
|
+
blockquote.epigraph {
|
|
53
|
+
margin: 2em 5em ; }
|
|
54
|
+
|
|
55
|
+
dl.docutils dd {
|
|
56
|
+
margin-bottom: 0.5em }
|
|
57
|
+
|
|
58
|
+
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
|
63
|
+
dl.docutils dt {
|
|
64
|
+
font-weight: bold }
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
div.abstract {
|
|
68
|
+
margin: 2em 5em }
|
|
69
|
+
|
|
70
|
+
div.abstract p.topic-title {
|
|
71
|
+
font-weight: bold ;
|
|
72
|
+
text-align: center }
|
|
73
|
+
|
|
74
|
+
div.admonition, div.attention, div.caution, div.danger, div.error,
|
|
75
|
+
div.hint, div.important, div.note, div.tip, div.warning {
|
|
76
|
+
margin: 2em ;
|
|
77
|
+
border: medium outset ;
|
|
78
|
+
padding: 1em }
|
|
79
|
+
|
|
80
|
+
div.admonition p.admonition-title, div.hint p.admonition-title,
|
|
81
|
+
div.important p.admonition-title, div.note p.admonition-title,
|
|
82
|
+
div.tip p.admonition-title {
|
|
83
|
+
font-weight: bold ;
|
|
84
|
+
font-family: sans-serif }
|
|
85
|
+
|
|
86
|
+
div.attention p.admonition-title, div.caution p.admonition-title,
|
|
87
|
+
div.danger p.admonition-title, div.error p.admonition-title,
|
|
88
|
+
div.warning p.admonition-title, .code .error {
|
|
89
|
+
color: red ;
|
|
90
|
+
font-weight: bold ;
|
|
91
|
+
font-family: sans-serif }
|
|
92
|
+
|
|
93
|
+
/* Uncomment (and remove this text!) to get reduced vertical space in
|
|
94
|
+
compound paragraphs.
|
|
95
|
+
div.compound .compound-first, div.compound .compound-middle {
|
|
96
|
+
margin-bottom: 0.5em }
|
|
97
|
+
|
|
98
|
+
div.compound .compound-last, div.compound .compound-middle {
|
|
99
|
+
margin-top: 0.5em }
|
|
100
|
+
*/
|
|
101
|
+
|
|
102
|
+
div.dedication {
|
|
103
|
+
margin: 2em 5em ;
|
|
104
|
+
text-align: center ;
|
|
105
|
+
font-style: italic }
|
|
106
|
+
|
|
107
|
+
div.dedication p.topic-title {
|
|
108
|
+
font-weight: bold ;
|
|
109
|
+
font-style: normal }
|
|
110
|
+
|
|
111
|
+
div.figure {
|
|
112
|
+
margin-left: 2em ;
|
|
113
|
+
margin-right: 2em }
|
|
114
|
+
|
|
115
|
+
div.footer, div.header {
|
|
116
|
+
clear: both;
|
|
117
|
+
font-size: smaller }
|
|
118
|
+
|
|
119
|
+
div.line-block {
|
|
120
|
+
display: block ;
|
|
121
|
+
margin-top: 1em ;
|
|
122
|
+
margin-bottom: 1em }
|
|
123
|
+
|
|
124
|
+
div.line-block div.line-block {
|
|
125
|
+
margin-top: 0 ;
|
|
126
|
+
margin-bottom: 0 ;
|
|
127
|
+
margin-left: 1.5em }
|
|
128
|
+
|
|
129
|
+
div.sidebar {
|
|
130
|
+
margin: 0 0 0.5em 1em ;
|
|
131
|
+
border: medium outset ;
|
|
132
|
+
padding: 1em ;
|
|
133
|
+
background-color: #ffffee ;
|
|
134
|
+
width: 40% ;
|
|
135
|
+
float: right ;
|
|
136
|
+
clear: right }
|
|
137
|
+
|
|
138
|
+
div.sidebar p.rubric {
|
|
139
|
+
font-family: sans-serif ;
|
|
140
|
+
font-size: medium }
|
|
141
|
+
|
|
142
|
+
div.system-messages {
|
|
143
|
+
margin: 5em }
|
|
144
|
+
|
|
145
|
+
div.system-messages h1 {
|
|
146
|
+
color: red }
|
|
147
|
+
|
|
148
|
+
div.system-message {
|
|
149
|
+
border: medium outset ;
|
|
150
|
+
padding: 1em }
|
|
151
|
+
|
|
152
|
+
div.system-message p.system-message-title {
|
|
153
|
+
color: red ;
|
|
154
|
+
font-weight: bold }
|
|
155
|
+
|
|
156
|
+
div.topic {
|
|
157
|
+
margin: 2em }
|
|
158
|
+
|
|
159
|
+
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
|
160
|
+
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
|
161
|
+
margin-top: 0.4em }
|
|
162
|
+
|
|
163
|
+
h1.title {
|
|
164
|
+
text-align: center }
|
|
165
|
+
|
|
166
|
+
h2.subtitle {
|
|
167
|
+
text-align: center }
|
|
168
|
+
|
|
169
|
+
hr.docutils {
|
|
170
|
+
width: 75% }
|
|
171
|
+
|
|
172
|
+
img.align-left, .figure.align-left, object.align-left, table.align-left {
|
|
173
|
+
clear: left ;
|
|
174
|
+
float: left ;
|
|
175
|
+
margin-right: 1em }
|
|
176
|
+
|
|
177
|
+
img.align-right, .figure.align-right, object.align-right, table.align-right {
|
|
178
|
+
clear: right ;
|
|
179
|
+
float: right ;
|
|
180
|
+
margin-left: 1em }
|
|
181
|
+
|
|
182
|
+
img.align-center, .figure.align-center, object.align-center {
|
|
183
|
+
display: block;
|
|
184
|
+
margin-left: auto;
|
|
185
|
+
margin-right: auto;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
table.align-center {
|
|
189
|
+
margin-left: auto;
|
|
190
|
+
margin-right: auto;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.align-left {
|
|
194
|
+
text-align: left }
|
|
195
|
+
|
|
196
|
+
.align-center {
|
|
197
|
+
clear: both ;
|
|
198
|
+
text-align: center }
|
|
199
|
+
|
|
200
|
+
.align-right {
|
|
201
|
+
text-align: right }
|
|
202
|
+
|
|
203
|
+
/* reset inner alignment in figures */
|
|
204
|
+
div.align-right {
|
|
205
|
+
text-align: inherit }
|
|
206
|
+
|
|
207
|
+
/* div.align-center * { */
|
|
208
|
+
/* text-align: left } */
|
|
209
|
+
|
|
210
|
+
.align-top {
|
|
211
|
+
vertical-align: top }
|
|
212
|
+
|
|
213
|
+
.align-middle {
|
|
214
|
+
vertical-align: middle }
|
|
215
|
+
|
|
216
|
+
.align-bottom {
|
|
217
|
+
vertical-align: bottom }
|
|
218
|
+
|
|
219
|
+
ol.simple, ul.simple {
|
|
220
|
+
margin-bottom: 1em }
|
|
221
|
+
|
|
222
|
+
ol.arabic {
|
|
223
|
+
list-style: decimal }
|
|
224
|
+
|
|
225
|
+
ol.loweralpha {
|
|
226
|
+
list-style: lower-alpha }
|
|
227
|
+
|
|
228
|
+
ol.upperalpha {
|
|
229
|
+
list-style: upper-alpha }
|
|
230
|
+
|
|
231
|
+
ol.lowerroman {
|
|
232
|
+
list-style: lower-roman }
|
|
233
|
+
|
|
234
|
+
ol.upperroman {
|
|
235
|
+
list-style: upper-roman }
|
|
236
|
+
|
|
237
|
+
p.attribution {
|
|
238
|
+
text-align: right ;
|
|
239
|
+
margin-left: 50% }
|
|
240
|
+
|
|
241
|
+
p.caption {
|
|
242
|
+
font-style: italic }
|
|
243
|
+
|
|
244
|
+
p.credits {
|
|
245
|
+
font-style: italic ;
|
|
246
|
+
font-size: smaller }
|
|
247
|
+
|
|
248
|
+
p.label {
|
|
249
|
+
white-space: nowrap }
|
|
250
|
+
|
|
251
|
+
p.rubric {
|
|
252
|
+
font-weight: bold ;
|
|
253
|
+
font-size: larger ;
|
|
254
|
+
color: maroon ;
|
|
255
|
+
text-align: center }
|
|
256
|
+
|
|
257
|
+
p.sidebar-title {
|
|
258
|
+
font-family: sans-serif ;
|
|
259
|
+
font-weight: bold ;
|
|
260
|
+
font-size: larger }
|
|
261
|
+
|
|
262
|
+
p.sidebar-subtitle {
|
|
263
|
+
font-family: sans-serif ;
|
|
264
|
+
font-weight: bold }
|
|
265
|
+
|
|
266
|
+
p.topic-title {
|
|
267
|
+
font-weight: bold }
|
|
268
|
+
|
|
269
|
+
pre.address {
|
|
270
|
+
margin-bottom: 0 ;
|
|
271
|
+
margin-top: 0 ;
|
|
272
|
+
font: inherit }
|
|
273
|
+
|
|
274
|
+
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
|
275
|
+
margin-left: 2em ;
|
|
276
|
+
margin-right: 2em }
|
|
277
|
+
|
|
278
|
+
pre.code .ln { color: gray; } /* line numbers */
|
|
279
|
+
pre.code, code { background-color: #eeeeee }
|
|
280
|
+
pre.code .comment, code .comment { color: #5C6576 }
|
|
281
|
+
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
|
282
|
+
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
|
283
|
+
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
|
284
|
+
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
|
285
|
+
pre.code .inserted, code .inserted { background-color: #A3D289}
|
|
286
|
+
|
|
287
|
+
span.classifier {
|
|
288
|
+
font-family: sans-serif ;
|
|
289
|
+
font-style: oblique }
|
|
290
|
+
|
|
291
|
+
span.classifier-delimiter {
|
|
292
|
+
font-family: sans-serif ;
|
|
293
|
+
font-weight: bold }
|
|
294
|
+
|
|
295
|
+
span.interpreted {
|
|
296
|
+
font-family: sans-serif }
|
|
297
|
+
|
|
298
|
+
span.option {
|
|
299
|
+
white-space: nowrap }
|
|
300
|
+
|
|
301
|
+
span.pre {
|
|
302
|
+
white-space: pre }
|
|
303
|
+
|
|
304
|
+
span.problematic, pre.problematic {
|
|
305
|
+
color: red }
|
|
306
|
+
|
|
307
|
+
span.section-subtitle {
|
|
308
|
+
/* font-size relative to parent (h1..h6 element) */
|
|
309
|
+
font-size: 80% }
|
|
310
|
+
|
|
311
|
+
table.citation {
|
|
312
|
+
border-left: solid 1px gray;
|
|
313
|
+
margin-left: 1px }
|
|
314
|
+
|
|
315
|
+
table.docinfo {
|
|
316
|
+
margin: 2em 4em }
|
|
317
|
+
|
|
318
|
+
table.docutils {
|
|
319
|
+
margin-top: 0.5em ;
|
|
320
|
+
margin-bottom: 0.5em }
|
|
321
|
+
|
|
322
|
+
table.footnote {
|
|
323
|
+
border-left: solid 1px black;
|
|
324
|
+
margin-left: 1px }
|
|
325
|
+
|
|
326
|
+
table.docutils td, table.docutils th,
|
|
327
|
+
table.docinfo td, table.docinfo th {
|
|
328
|
+
padding-left: 0.5em ;
|
|
329
|
+
padding-right: 0.5em ;
|
|
330
|
+
vertical-align: top }
|
|
331
|
+
|
|
332
|
+
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
|
333
|
+
font-weight: bold ;
|
|
334
|
+
text-align: left ;
|
|
335
|
+
white-space: nowrap ;
|
|
336
|
+
padding-left: 0 }
|
|
337
|
+
|
|
338
|
+
/* "booktabs" style (no vertical lines) */
|
|
339
|
+
table.docutils.booktabs {
|
|
340
|
+
border: 0px;
|
|
341
|
+
border-top: 2px solid;
|
|
342
|
+
border-bottom: 2px solid;
|
|
343
|
+
border-collapse: collapse;
|
|
344
|
+
}
|
|
345
|
+
table.docutils.booktabs * {
|
|
346
|
+
border: 0px;
|
|
347
|
+
}
|
|
348
|
+
table.docutils.booktabs th {
|
|
349
|
+
border-bottom: thin solid;
|
|
350
|
+
text-align: left;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
|
354
|
+
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
|
355
|
+
font-size: 100% }
|
|
356
|
+
|
|
357
|
+
ul.auto-toc {
|
|
358
|
+
list-style-type: none }
|
|
359
|
+
|
|
360
|
+
</style>
|
|
361
|
+
</head>
|
|
362
|
+
<body>
|
|
363
|
+
<div class="document" id="mail-message-search">
|
|
364
|
+
<h1 class="title">Mail Message Search</h1>
|
|
365
|
+
|
|
366
|
+
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
367
|
+
!! This file is generated by oca-gen-addon-readme !!
|
|
368
|
+
!! changes will be overwritten. !!
|
|
369
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
370
|
+
!! source digest: sha256:e276b9738477253e4d9e296f1f4b18c589c12bc22463090e31cb188ce2aaba2b
|
|
371
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
372
|
+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/social/tree/16.0/mail_message_search"><img alt="OCA/social" src="https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/social-16-0/social-16-0-mail_message_search"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/social&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
|
373
|
+
<p>This module enables searching for messages across any record that uses
|
|
374
|
+
the chatter, based on their associated conversation threads. It
|
|
375
|
+
dynamically adds a Message Search field to the search view of any model
|
|
376
|
+
that inherits from <tt class="docutils literal">mail.thread</tt>.</p>
|
|
377
|
+
<p>The Message Search field performs a smart, per-word search across a
|
|
378
|
+
message’s subject, body, sender, and reply-to fields.</p>
|
|
379
|
+
<p><strong>Table of contents</strong></p>
|
|
380
|
+
<div class="contents local topic" id="contents">
|
|
381
|
+
<ul class="simple">
|
|
382
|
+
<li><a class="reference internal" href="#use-cases-context" id="toc-entry-1">Use Cases / Context</a></li>
|
|
383
|
+
<li><a class="reference internal" href="#usage" id="toc-entry-2">Usage</a></li>
|
|
384
|
+
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-3">Bug Tracker</a></li>
|
|
385
|
+
<li><a class="reference internal" href="#credits" id="toc-entry-4">Credits</a><ul>
|
|
386
|
+
<li><a class="reference internal" href="#authors" id="toc-entry-5">Authors</a></li>
|
|
387
|
+
<li><a class="reference internal" href="#contributors" id="toc-entry-6">Contributors</a></li>
|
|
388
|
+
<li><a class="reference internal" href="#maintainers" id="toc-entry-7">Maintainers</a></li>
|
|
389
|
+
</ul>
|
|
390
|
+
</li>
|
|
391
|
+
</ul>
|
|
392
|
+
</div>
|
|
393
|
+
<div class="section" id="use-cases-context">
|
|
394
|
+
<h1><a class="toc-backref" href="#toc-entry-1">Use Cases / Context</a></h1>
|
|
395
|
+
<p>This module offers an alternative to <tt class="docutils literal">base_search_mail_content</tt>,
|
|
396
|
+
designed to better support languages that do not separate words with
|
|
397
|
+
spaces (e.g., Chinese, Japanese, Korean, Thai).</p>
|
|
398
|
+
<p>The original module relies on PostgreSQL’s <tt class="docutils literal">pg_trgm</tt>, which requires
|
|
399
|
+
three-character tokens and a similarity score above the default
|
|
400
|
+
cutoff—making it ineffective for languages without space-separated
|
|
401
|
+
words.</p>
|
|
402
|
+
<p>This module uses direct keyword matching across key fields in
|
|
403
|
+
<tt class="docutils literal">mail.message</tt>, offering more reliable results in multilingual
|
|
404
|
+
environments.</p>
|
|
405
|
+
</div>
|
|
406
|
+
<div class="section" id="usage">
|
|
407
|
+
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
|
|
408
|
+
<p>Go to any model that contains a chatter (e.g. Contacts, …). Search for
|
|
409
|
+
content in field ‘Message Search’.</p>
|
|
410
|
+
</div>
|
|
411
|
+
<div class="section" id="bug-tracker">
|
|
412
|
+
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
|
|
413
|
+
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/social/issues">GitHub Issues</a>.
|
|
414
|
+
In case of trouble, please check there if your issue has already been reported.
|
|
415
|
+
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
416
|
+
<a class="reference external" href="https://github.com/OCA/social/issues/new?body=module:%20mail_message_search%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
|
417
|
+
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
|
418
|
+
</div>
|
|
419
|
+
<div class="section" id="credits">
|
|
420
|
+
<h1><a class="toc-backref" href="#toc-entry-4">Credits</a></h1>
|
|
421
|
+
<div class="section" id="authors">
|
|
422
|
+
<h2><a class="toc-backref" href="#toc-entry-5">Authors</a></h2>
|
|
423
|
+
<ul class="simple">
|
|
424
|
+
<li>Quartile</li>
|
|
425
|
+
</ul>
|
|
426
|
+
</div>
|
|
427
|
+
<div class="section" id="contributors">
|
|
428
|
+
<h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
|
|
429
|
+
<ul class="simple">
|
|
430
|
+
<li><a class="reference external" href="https://www.quartile.co">Quartile</a>:<ul>
|
|
431
|
+
<li>Aung Ko Ko Lin</li>
|
|
432
|
+
<li>Yoshi Tashiro</li>
|
|
433
|
+
</ul>
|
|
434
|
+
</li>
|
|
435
|
+
</ul>
|
|
436
|
+
</div>
|
|
437
|
+
<div class="section" id="maintainers">
|
|
438
|
+
<h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
|
|
439
|
+
<p>This module is maintained by the OCA.</p>
|
|
440
|
+
<a class="reference external image-reference" href="https://odoo-community.org">
|
|
441
|
+
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
|
|
442
|
+
</a>
|
|
443
|
+
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
444
|
+
mission is to support the collaborative development of Odoo features and
|
|
445
|
+
promote its widespread use.</p>
|
|
446
|
+
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
|
|
447
|
+
<p><a class="reference external image-reference" href="https://github.com/yostashiro"><img alt="yostashiro" src="https://github.com/yostashiro.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/aungkokolin1997"><img alt="aungkokolin1997" src="https://github.com/aungkokolin1997.png?size=40px" /></a></p>
|
|
448
|
+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/social/tree/16.0/mail_message_search">OCA/social</a> project on GitHub.</p>
|
|
449
|
+
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
|
450
|
+
</div>
|
|
451
|
+
</div>
|
|
452
|
+
</div>
|
|
453
|
+
</body>
|
|
454
|
+
</html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from . import test_mail_message_search
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Copyright 2017 ForgeFlow S.L.
|
|
2
|
+
# (http://www.forgeflow.com)
|
|
3
|
+
# Copyright 2025 Quartile (https://www.quartile.co)
|
|
4
|
+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
5
|
+
|
|
6
|
+
from odoo.tests.common import TransactionCase
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class TestBaseSearchMailContent(TransactionCase):
|
|
10
|
+
@classmethod
|
|
11
|
+
def setUpClass(cls):
|
|
12
|
+
super().setUpClass()
|
|
13
|
+
cls.Partner = cls.env["res.partner"]
|
|
14
|
+
cls.partner_test = cls.Partner.create({"name": "Test Partner"})
|
|
15
|
+
|
|
16
|
+
def test_mail_message_get_views(self):
|
|
17
|
+
res = self.env["mail.channel"].get_views(
|
|
18
|
+
[[False, "search"]],
|
|
19
|
+
{"load_fields": False, "load_filters": True, "toolbar": True},
|
|
20
|
+
)
|
|
21
|
+
self.assertIn(
|
|
22
|
+
"message_search",
|
|
23
|
+
res["models"]["mail.channel"],
|
|
24
|
+
"message_search field was not detected",
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
def test_mail_message_search_with_multi_strings_en(self):
|
|
28
|
+
self.partner_test.message_post(body="This is a test message.")
|
|
29
|
+
partner = self.Partner.search([("message_search", "ilike", "test mess")])
|
|
30
|
+
self.assertEqual(partner, self.partner_test)
|
|
31
|
+
partner = self.Partner.search([("message_search", "ilike", "mess test")])
|
|
32
|
+
self.assertEqual(partner, self.partner_test)
|
|
33
|
+
partner = self.Partner.search([("message_search", "ilike", "messy test")])
|
|
34
|
+
self.assertFalse(partner)
|
|
35
|
+
|
|
36
|
+
def test_mail_message_search_with_multi_strings_ja(self):
|
|
37
|
+
self.partner_test.message_post(body="これはテスト用のメッセージです。")
|
|
38
|
+
partner = self.Partner.search([("message_search", "ilike", "テスト です ")])
|
|
39
|
+
self.assertEqual(partner, self.partner_test)
|
|
40
|
+
partner = self.Partner.search([("message_search", "ilike", "です テスト ")])
|
|
41
|
+
self.assertEqual(partner, self.partner_test)
|
|
42
|
+
partner = self.Partner.search([("message_search", "ilike", "ですわ テスト")])
|
|
43
|
+
self.assertFalse(partner)
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: odoo-addon-mail_message_search
|
|
3
|
+
Version: 16.0.1.0.0.2
|
|
4
|
+
Summary: Mail Message Search
|
|
5
|
+
Home-page: https://github.com/OCA/social
|
|
6
|
+
Author: Quartile, Odoo Community Association (OCA)
|
|
7
|
+
Author-email: support@odoo-community.org
|
|
8
|
+
License: AGPL-3
|
|
9
|
+
Classifier: Programming Language :: Python
|
|
10
|
+
Classifier: Framework :: Odoo
|
|
11
|
+
Classifier: Framework :: Odoo :: 16.0
|
|
12
|
+
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
|
13
|
+
Requires-Python: >=3.10
|
|
14
|
+
Requires-Dist: odoo<16.1dev,>=16.0a
|
|
15
|
+
|
|
16
|
+
===================
|
|
17
|
+
Mail Message Search
|
|
18
|
+
===================
|
|
19
|
+
|
|
20
|
+
..
|
|
21
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
22
|
+
!! This file is generated by oca-gen-addon-readme !!
|
|
23
|
+
!! changes will be overwritten. !!
|
|
24
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
25
|
+
!! source digest: sha256:e276b9738477253e4d9e296f1f4b18c589c12bc22463090e31cb188ce2aaba2b
|
|
26
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
27
|
+
|
|
28
|
+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
29
|
+
:target: https://odoo-community.org/page/development-status
|
|
30
|
+
:alt: Beta
|
|
31
|
+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
|
|
32
|
+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
|
33
|
+
:alt: License: AGPL-3
|
|
34
|
+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github
|
|
35
|
+
:target: https://github.com/OCA/social/tree/16.0/mail_message_search
|
|
36
|
+
:alt: OCA/social
|
|
37
|
+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
|
38
|
+
:target: https://translation.odoo-community.org/projects/social-16-0/social-16-0-mail_message_search
|
|
39
|
+
:alt: Translate me on Weblate
|
|
40
|
+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
|
41
|
+
:target: https://runboat.odoo-community.org/builds?repo=OCA/social&target_branch=16.0
|
|
42
|
+
:alt: Try me on Runboat
|
|
43
|
+
|
|
44
|
+
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|
45
|
+
|
|
46
|
+
This module enables searching for messages across any record that uses
|
|
47
|
+
the chatter, based on their associated conversation threads. It
|
|
48
|
+
dynamically adds a Message Search field to the search view of any model
|
|
49
|
+
that inherits from ``mail.thread``.
|
|
50
|
+
|
|
51
|
+
The Message Search field performs a smart, per-word search across a
|
|
52
|
+
message’s subject, body, sender, and reply-to fields.
|
|
53
|
+
|
|
54
|
+
**Table of contents**
|
|
55
|
+
|
|
56
|
+
.. contents::
|
|
57
|
+
:local:
|
|
58
|
+
|
|
59
|
+
Use Cases / Context
|
|
60
|
+
===================
|
|
61
|
+
|
|
62
|
+
This module offers an alternative to ``base_search_mail_content``,
|
|
63
|
+
designed to better support languages that do not separate words with
|
|
64
|
+
spaces (e.g., Chinese, Japanese, Korean, Thai).
|
|
65
|
+
|
|
66
|
+
The original module relies on PostgreSQL's ``pg_trgm``, which requires
|
|
67
|
+
three-character tokens and a similarity score above the default
|
|
68
|
+
cutoff—making it ineffective for languages without space-separated
|
|
69
|
+
words.
|
|
70
|
+
|
|
71
|
+
This module uses direct keyword matching across key fields in
|
|
72
|
+
``mail.message``, offering more reliable results in multilingual
|
|
73
|
+
environments.
|
|
74
|
+
|
|
75
|
+
Usage
|
|
76
|
+
=====
|
|
77
|
+
|
|
78
|
+
Go to any model that contains a chatter (e.g. Contacts, ...). Search for
|
|
79
|
+
content in field 'Message Search'.
|
|
80
|
+
|
|
81
|
+
Bug Tracker
|
|
82
|
+
===========
|
|
83
|
+
|
|
84
|
+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/social/issues>`_.
|
|
85
|
+
In case of trouble, please check there if your issue has already been reported.
|
|
86
|
+
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
87
|
+
`feedback <https://github.com/OCA/social/issues/new?body=module:%20mail_message_search%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
|
88
|
+
|
|
89
|
+
Do not contact contributors directly about support or help with technical issues.
|
|
90
|
+
|
|
91
|
+
Credits
|
|
92
|
+
=======
|
|
93
|
+
|
|
94
|
+
Authors
|
|
95
|
+
-------
|
|
96
|
+
|
|
97
|
+
* Quartile
|
|
98
|
+
|
|
99
|
+
Contributors
|
|
100
|
+
------------
|
|
101
|
+
|
|
102
|
+
- `Quartile <https://www.quartile.co>`__:
|
|
103
|
+
|
|
104
|
+
- Aung Ko Ko Lin
|
|
105
|
+
- Yoshi Tashiro
|
|
106
|
+
|
|
107
|
+
Maintainers
|
|
108
|
+
-----------
|
|
109
|
+
|
|
110
|
+
This module is maintained by the OCA.
|
|
111
|
+
|
|
112
|
+
.. image:: https://odoo-community.org/logo.png
|
|
113
|
+
:alt: Odoo Community Association
|
|
114
|
+
:target: https://odoo-community.org
|
|
115
|
+
|
|
116
|
+
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
117
|
+
mission is to support the collaborative development of Odoo features and
|
|
118
|
+
promote its widespread use.
|
|
119
|
+
|
|
120
|
+
.. |maintainer-yostashiro| image:: https://github.com/yostashiro.png?size=40px
|
|
121
|
+
:target: https://github.com/yostashiro
|
|
122
|
+
:alt: yostashiro
|
|
123
|
+
.. |maintainer-aungkokolin1997| image:: https://github.com/aungkokolin1997.png?size=40px
|
|
124
|
+
:target: https://github.com/aungkokolin1997
|
|
125
|
+
:alt: aungkokolin1997
|
|
126
|
+
|
|
127
|
+
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
|
|
128
|
+
|
|
129
|
+
|maintainer-yostashiro| |maintainer-aungkokolin1997|
|
|
130
|
+
|
|
131
|
+
This module is part of the `OCA/social <https://github.com/OCA/social/tree/16.0/mail_message_search>`_ project on GitHub.
|
|
132
|
+
|
|
133
|
+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
odoo/addons/mail_message_search/README.rst,sha256=SUaezMXdwk7vvSRp3yyDdj9MTgJKZRvqYvSzde6u9iM,4266
|
|
2
|
+
odoo/addons/mail_message_search/__init__.py,sha256=X9EJGOE2GtZbS0G82PtSXmWSZ_R8jEM0rlJTDliQjp4,21
|
|
3
|
+
odoo/addons/mail_message_search/__manifest__.py,sha256=Y5_dOJC0N9BgWOUm3c26D6cJwLJlemFzHcNNspkGhG8,422
|
|
4
|
+
odoo/addons/mail_message_search/i18n/mail_message_search.pot,sha256=WbTsQbSHkR2WrkfIH_l6TGZGPjZT1kNlGosDa7dF2nc,5826
|
|
5
|
+
odoo/addons/mail_message_search/models/__init__.py,sha256=QmyI8o8B2etqhmkm1HrD8gLlBRgfenvRG_HdDvkfPUo,26
|
|
6
|
+
odoo/addons/mail_message_search/models/mail_thread.py,sha256=GexYAGI-eGcj8_FAUC-S9LR54NBGz8P6AVFq3HTXVFw,2324
|
|
7
|
+
odoo/addons/mail_message_search/readme/CONTEXT.md,sha256=5qBltw4t57AoEdbOgEpl0oWq8QWBJyn7QxGaDR8UxJo,532
|
|
8
|
+
odoo/addons/mail_message_search/readme/CONTRIBUTORS.md,sha256=mbhQ3IpuMBBgONEp9tbizV_71JQO2PEJ74zNZkfBZu8,76
|
|
9
|
+
odoo/addons/mail_message_search/readme/DESCRIPTION.md,sha256=mX6-nb1A9NVTN_jVi8vo7BgZkaJmL15kN5gZZU1_xV0,366
|
|
10
|
+
odoo/addons/mail_message_search/readme/USAGE.md,sha256=KCfpWiPifKB0UHlGUxo8wM3WGeNDdc7fzyIDXMFc_Ak,108
|
|
11
|
+
odoo/addons/mail_message_search/static/description/icon.png,sha256=CgnOEZCwoe6f1vlLwkqFVfc2q_uwBMU0UnXN8j6X5ag,10254
|
|
12
|
+
odoo/addons/mail_message_search/static/description/index.html,sha256=j3tqD-R_4DHuwjj8dQPwxWG3ryl9A1u4obV1kokkgOw,14091
|
|
13
|
+
odoo/addons/mail_message_search/tests/__init__.py,sha256=n01rl1-xsfjHL4C6U3IUrT4XAAKfLd2s2IZO7DHHamo,39
|
|
14
|
+
odoo/addons/mail_message_search/tests/test_mail_message_search.py,sha256=WlOh7qXtFvtx-2Q-VQ8FFNfIltYfbBTRgdyoWhOz8Aw,1940
|
|
15
|
+
odoo_addon_mail_message_search-16.0.1.0.0.2.dist-info/METADATA,sha256=fpbPTsOWeE6kAgvk_wHJX2RX4mEYxBTCi6QtwwEOVPU,4773
|
|
16
|
+
odoo_addon_mail_message_search-16.0.1.0.0.2.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
17
|
+
odoo_addon_mail_message_search-16.0.1.0.0.2.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
|
18
|
+
odoo_addon_mail_message_search-16.0.1.0.0.2.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
odoo
|