Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ addon | version | maintainers | summary
[mail_force_email_notification](mail_force_email_notification/) | 18.0.1.0.0 | | Context key to define notifications to be sent by emaildefined by force_notification_by_email context key
[mail_inline_css](mail_inline_css/) | 18.0.1.0.0 | | Convert style tags in inline style in your mails
[mail_layout_preview](mail_layout_preview/) | 18.0.1.0.0 | | Preview email templates in the browser
[mail_message_search](mail_message_search/) | 18.0.1.0.1 | <a href='https://github.com/yostashiro'><img src='https://github.com/yostashiro.png' width='32' height='32' style='border-radius:50%;' alt='yostashiro'/></a> <a href='https://github.com/aungkokolin1997'><img src='https://github.com/aungkokolin1997.png' width='32' height='32' style='border-radius:50%;' alt='aungkokolin1997'/></a> | Mail Message Search
[mail_message_search](mail_message_search/) | 18.0.1.0.2 | <a href='https://github.com/yostashiro'><img src='https://github.com/yostashiro.png' width='32' height='32' style='border-radius:50%;' alt='yostashiro'/></a> <a href='https://github.com/aungkokolin1997'><img src='https://github.com/aungkokolin1997.png' width='32' height='32' style='border-radius:50%;' alt='aungkokolin1997'/></a> | Mail Message Search
[mail_notification_clean_status_error](mail_notification_clean_status_error/) | 18.0.1.0.0 | <a href='https://github.com/sebalix'><img src='https://github.com/sebalix.png' width='32' height='32' style='border-radius:50%;' alt='sebalix'/></a> | Extend Odoo scheduled action to also delete notifications in error.
[mail_notification_custom_subject](mail_notification_custom_subject/) | 18.0.1.0.0 | <a href='https://github.com/yajo'><img src='https://github.com/yajo.png' width='32' height='32' style='border-radius:50%;' alt='yajo'/></a> | Apply a custom subject to mail notifications
[mail_optional_autofollow](mail_optional_autofollow/) | 18.0.1.0.0 | | Choose if you want to automatically add new recipients as followers on mail.compose.message
Expand All @@ -51,7 +51,7 @@ addon | version | maintainers | summary
[mail_send_confirmation](mail_send_confirmation/) | 18.0.1.0.0 | | Mail Send Confirmation
[mail_show_follower](mail_show_follower/) | 18.0.1.0.1 | <a href='https://github.com/yajo'><img src='https://github.com/yajo.png' width='32' height='32' style='border-radius:50%;' alt='yajo'/></a> | Show CC document followers in mails.
[mail_suggested_recipient_unchecked](mail_suggested_recipient_unchecked/) | 18.0.1.0.0 | <a href='https://github.com/victoralmau'><img src='https://github.com/victoralmau.png' width='32' height='32' style='border-radius:50%;' alt='victoralmau'/></a> | Mail suggested recipient unchecked
[mail_tracking](mail_tracking/) | 18.0.1.0.6 | | Email tracking system for all mails sent
[mail_tracking](mail_tracking/) | 18.0.1.0.7 | | Email tracking system for all mails sent
[mail_tracking_mailgun](mail_tracking_mailgun/) | 18.0.1.0.0 | | Mail tracking and Mailgun webhooks integration
[mail_tracking_mass_mailing](mail_tracking_mass_mailing/) | 18.0.1.0.0 | | Improve mass mailing email tracking

Expand Down
14 changes: 13 additions & 1 deletion mail_message_search/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Mail Message Search
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:5b7a84e863aa1b256584e7696181a8319ccf3fe658eee3ba07567752da997df7
!! source digest: sha256:349301b4cca46679cb0a86aa50f8fe0018454f85e11325f8ddcb83c4dfdf5e57
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down Expand Up @@ -61,6 +61,18 @@ This module uses direct keyword matching across key fields in
``mail.message``, offering more reliable results in multilingual
environments.

Configuration
=============

If your database is very large, you can limit how many messages a search
returns to prevent crashes.

- Go to Settings ▸ Technical ▸ System Parameters.
- Add a new parameter:

- Key: mail_message_search.message_limit
- Value: your desired limit (e.g., 5000).

Usage
=====

Expand Down
2 changes: 1 addition & 1 deletion mail_message_search/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Mail Message Search",
"version": "18.0.1.0.1",
"version": "18.0.1.0.2",
"author": "Quartile, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/mail",
"depends": ["mail"],
Expand Down
10 changes: 8 additions & 2 deletions mail_message_search/models/mail_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,14 @@ def _search_message_search(self, operator, value):
word_domain_list.append(expression.OR(field_domain_list))
word_domain = expression.AND(word_domain_list)
domain = expression.AND([[("model", "=", self._name)], word_domain])
messages = self.env["mail.message"].search(domain)
return [("id", "in", messages.mapped("res_id"))]
limit_value = (
self.env["ir.config_parameter"]
.sudo()
.get_param("mail_message_search.message_limit")
)
limit = int(limit_value) if limit_value else None
messages = self.env["mail.message"]._search(domain, limit=limit)
return [("id", "in", messages.subselect("res_id"))]

message_search = fields.Text(
help="Message search, to be used only in searches",
Expand Down
7 changes: 7 additions & 0 deletions mail_message_search/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
If your database is very large, you can limit how many messages a search returns to
prevent crashes.

- Go to Settings ▸ Technical ▸ System Parameters.
- Add a new parameter:
- Key: mail_message_search.message_limit
- Value: your desired limit (e.g., 5000).
40 changes: 27 additions & 13 deletions mail_message_search/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ <h1>Mail Message Search</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:5b7a84e863aa1b256584e7696181a8319ccf3fe658eee3ba07567752da997df7
!! source digest: sha256:349301b4cca46679cb0a86aa50f8fe0018454f85e11325f8ddcb83c4dfdf5e57
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/mail/tree/18.0/mail_message_search"><img alt="OCA/mail" src="https://img.shields.io/badge/github-OCA%2Fmail-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/mail-18-0/mail-18-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/mail&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module enables searching for messages across any record that uses
Expand All @@ -385,12 +385,13 @@ <h1>Mail Message Search</h1>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#use-cases-context" id="toc-entry-1">Use Cases / Context</a></li>
<li><a class="reference internal" href="#usage" id="toc-entry-2">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-3">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-4">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-5">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-6">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-7">Maintainers</a></li>
<li><a class="reference internal" href="#configuration" id="toc-entry-2">Configuration</a></li>
<li><a class="reference internal" href="#usage" id="toc-entry-3">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-4">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-5">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-6">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-7">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-8">Maintainers</a></li>
</ul>
</li>
</ul>
Expand All @@ -408,29 +409,42 @@ <h2><a class="toc-backref" href="#toc-entry-1">Use Cases / Context</a></h2>
<tt class="docutils literal">mail.message</tt>, offering more reliable results in multilingual
environments.</p>
</div>
<div class="section" id="configuration">
<h2><a class="toc-backref" href="#toc-entry-2">Configuration</a></h2>
<p>If your database is very large, you can limit how many messages a search
returns to prevent crashes.</p>
<ul class="simple">
<li>Go to Settings ▸ Technical ▸ System Parameters.</li>
<li>Add a new parameter:<ul>
<li>Key: mail_message_search.message_limit</li>
<li>Value: your desired limit (e.g., 5000).</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="usage">
<h2><a class="toc-backref" href="#toc-entry-2">Usage</a></h2>
<h2><a class="toc-backref" href="#toc-entry-3">Usage</a></h2>
<p>Go to any model that contains a chatter (e.g. Contacts, …). Search for
content in field ‘Message Search’.</p>
</div>
<div class="section" id="bug-tracker">
<h2><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h2>
<h2><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h2>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/mail/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/mail/issues/new?body=module:%20mail_message_search%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h2><a class="toc-backref" href="#toc-entry-4">Credits</a></h2>
<h2><a class="toc-backref" href="#toc-entry-5">Credits</a></h2>
<div class="section" id="authors">
<h3><a class="toc-backref" href="#toc-entry-5">Authors</a></h3>
<h3><a class="toc-backref" href="#toc-entry-6">Authors</a></h3>
<ul class="simple">
<li>Quartile</li>
</ul>
</div>
<div class="section" id="contributors">
<h3><a class="toc-backref" href="#toc-entry-6">Contributors</a></h3>
<h3><a class="toc-backref" href="#toc-entry-7">Contributors</a></h3>
<ul class="simple">
<li><a class="reference external" href="https://www.quartile.co">Quartile</a>:<ul>
<li>Aung Ko Ko Lin</li>
Expand All @@ -440,7 +454,7 @@ <h3><a class="toc-backref" href="#toc-entry-6">Contributors</a></h3>
</ul>
</div>
<div class="section" id="maintainers">
<h3><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h3>
<h3><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h3>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
Expand Down
2 changes: 1 addition & 1 deletion mail_tracking/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Email tracking
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:1f1623a6f08afa9507deebf534e7eb24325927d829724858b58a3c9bb5bc2cb4
!! source digest: sha256:571d21edf517716228503f485f8ea57c4b818287ac17f38ba2d01b80a3862077
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
2 changes: 1 addition & 1 deletion mail_tracking/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{
"name": "Email tracking",
"summary": "Email tracking system for all mails sent",
"version": "18.0.1.0.6",
"version": "18.0.1.0.7",
"category": "Social Network",
"website": "https://github.com/OCA/mail",
"author": ("Tecnativa, Odoo Community Association (OCA)"),
Expand Down
2 changes: 1 addition & 1 deletion mail_tracking/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ <h1>Email tracking</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:1f1623a6f08afa9507deebf534e7eb24325927d829724858b58a3c9bb5bc2cb4
!! source digest: sha256:571d21edf517716228503f485f8ea57c4b818287ac17f38ba2d01b80a3862077
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/mail/tree/18.0/mail_tracking"><img alt="OCA/mail" src="https://img.shields.io/badge/github-OCA%2Fmail-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/mail-18-0/mail-18-0-mail_tracking"><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/mail&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module shows email notification tracking status for any messages in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ patch(MailCoreCommon.prototype, {
const {message_ids: messageIds} = payload;
for (const id of messageIds) {
const message = this.store.Message.get({id});
if (!message) continue;
const failedBox = this.store.failed;
if (notifId > failedBox.counter_bus_id) {
failedBox.counter--;
Expand Down