diff --git a/README.md b/README.md index a47a9f6b0..8e5b98d4c 100644 --- a/README.md +++ b/README.md @@ -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 | yostashiro aungkokolin1997 | Mail Message Search +[mail_message_search](mail_message_search/) | 18.0.1.0.2 | yostashiro aungkokolin1997 | Mail Message Search [mail_notification_clean_status_error](mail_notification_clean_status_error/) | 18.0.1.0.0 | sebalix | Extend Odoo scheduled action to also delete notifications in error. [mail_notification_custom_subject](mail_notification_custom_subject/) | 18.0.1.0.0 | yajo | 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 @@ -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 | yajo | Show CC document followers in mails. [mail_suggested_recipient_unchecked](mail_suggested_recipient_unchecked/) | 18.0.1.0.0 | victoralmau | 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 diff --git a/mail_message_search/README.rst b/mail_message_search/README.rst index 5d2d36c3f..7758eeddb 100644 --- a/mail_message_search/README.rst +++ b/mail_message_search/README.rst @@ -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 @@ -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 ===== diff --git a/mail_message_search/__manifest__.py b/mail_message_search/__manifest__.py index 63abed502..a23cd3e23 100644 --- a/mail_message_search/__manifest__.py +++ b/mail_message_search/__manifest__.py @@ -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"], diff --git a/mail_message_search/models/mail_thread.py b/mail_message_search/models/mail_thread.py index 4ce3d3a3b..4789283e3 100644 --- a/mail_message_search/models/mail_thread.py +++ b/mail_message_search/models/mail_thread.py @@ -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", diff --git a/mail_message_search/readme/CONFIGURE.md b/mail_message_search/readme/CONFIGURE.md new file mode 100644 index 000000000..3bace50dc --- /dev/null +++ b/mail_message_search/readme/CONFIGURE.md @@ -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). diff --git a/mail_message_search/static/description/index.html b/mail_message_search/static/description/index.html index e12043477..038801178 100644 --- a/mail_message_search/static/description/index.html +++ b/mail_message_search/static/description/index.html @@ -372,7 +372,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 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/mail Translate me on Weblate Try me on Runboat

This module enables searching for messages across any record that uses @@ -385,12 +385,13 @@

Mail Message Search

+
+

Configuration

+

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

+ +
-

Usage

+

Usage

Go to any model that contains a chatter (e.g. Contacts, …). Search for content in field ‘Message Search’.

-

Bug Tracker

+

Bug Tracker

Bugs are tracked on GitHub Issues. 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 @@ -422,15 +436,15 @@

Bug Tracker

Do not contact contributors directly about support or help with technical issues.

-

Credits

+

Credits

-

Authors

+

Authors

-

Contributors

+

Contributors

-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association diff --git a/mail_tracking/README.rst b/mail_tracking/README.rst index c378cae17..885a7b159 100644 --- a/mail_tracking/README.rst +++ b/mail_tracking/README.rst @@ -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 diff --git a/mail_tracking/__manifest__.py b/mail_tracking/__manifest__.py index 0ce3008e5..99a6eee55 100644 --- a/mail_tracking/__manifest__.py +++ b/mail_tracking/__manifest__.py @@ -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)"), diff --git a/mail_tracking/static/description/index.html b/mail_tracking/static/description/index.html index 3000021fa..8d16d5b54 100644 --- a/mail_tracking/static/description/index.html +++ b/mail_tracking/static/description/index.html @@ -372,7 +372,7 @@

Email tracking

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:1f1623a6f08afa9507deebf534e7eb24325927d829724858b58a3c9bb5bc2cb4 +!! source digest: sha256:571d21edf517716228503f485f8ea57c4b818287ac17f38ba2d01b80a3862077 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/mail Translate me on Weblate Try me on Runboat

This module shows email notification tracking status for any messages in diff --git a/mail_tracking/static/src/services/mail_core_common_service_patch.esm.js b/mail_tracking/static/src/services/mail_core_common_service_patch.esm.js index 2c09f36e8..d5dcbc7f0 100644 --- a/mail_tracking/static/src/services/mail_core_common_service_patch.esm.js +++ b/mail_tracking/static/src/services/mail_core_common_service_patch.esm.js @@ -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--;