diff --git a/README.md b/README.md index afe8fb3f4..7464fb32a 100644 --- a/README.md +++ b/README.md @@ -21,10 +21,10 @@ Available addons ---------------- addon | version | maintainers | summary --- | --- | --- | --- -[base_search_mail_content](base_search_mail_content/) | 18.0.1.0.0 | | Base Search Mail Content +[base_search_mail_content](base_search_mail_content/) | 18.0.1.0.2 | | Base Search Mail Content [mail_activity_board](mail_activity_board/) | 18.0.1.0.0 | | Add Activity Boards [mail_activity_done](mail_activity_done/) | 18.0.1.0.0 | | Mail Activity Done -[mail_activity_team](mail_activity_team/) | 18.0.1.0.0 | | Add Teams to Activities +[mail_activity_team](mail_activity_team/) | 18.0.1.0.1 | | Add Teams to Activities [mail_attach_existing_attachment](mail_attach_existing_attachment/) | 18.0.1.0.0 | | Adding attachment on the object by sending this one [mail_attach_existing_attachment_account](mail_attach_existing_attachment_account/) | 18.0.1.0.0 | | Module to use attach existing attachment for account module [mail_autogenerated_header](mail_autogenerated_header/) | 18.0.1.0.0 | | Add headers to Odoo's mails indicating they are autogenerated @@ -36,7 +36,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.0 | yostashiro aungkokolin1997 | Mail Message Search +[mail_message_search](mail_message_search/) | 18.0.1.0.1 | 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 @@ -50,7 +50,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.4 | | Email tracking system for all mails sent +[mail_tracking](mail_tracking/) | 18.0.1.0.5 | | 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/base_search_mail_content/README.rst b/base_search_mail_content/README.rst index 1e2b654aa..374955958 100644 --- a/base_search_mail_content/README.rst +++ b/base_search_mail_content/README.rst @@ -11,7 +11,7 @@ Base Search Mail Content !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:97c31f4e41e21c646d32fb6d0e0286ac6d3626ae5bfc0109274b6e1b65724eb5 + !! source digest: sha256:f94db845b3f6bb06a1f792460142c6b5bec4946e13e8fed0b1d5e258b5f03487 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -118,6 +118,7 @@ Contributors - David Bañón - Nguyen Minh Chien +- Joel Estrada (`Moduon `__) Maintainers ----------- diff --git a/base_search_mail_content/__manifest__.py b/base_search_mail_content/__manifest__.py index 1b631c5cb..82c2d2703 100644 --- a/base_search_mail_content/__manifest__.py +++ b/base_search_mail_content/__manifest__.py @@ -6,7 +6,7 @@ { "name": "Base Search Mail Content", - "version": "18.0.1.0.0", + "version": "18.0.1.0.2", "author": "ForgeFlow, SerpentCS, Tecnativa, Odoo Community Association (OCA)", "website": "https://github.com/OCA/mail", "category": "Social", diff --git a/base_search_mail_content/models/mail_thread.py b/base_search_mail_content/models/mail_thread.py index 60e820ec5..870090a7f 100644 --- a/base_search_mail_content/models/mail_thread.py +++ b/base_search_mail_content/models/mail_thread.py @@ -15,17 +15,18 @@ class MailThread(models.AbstractModel): def _search_message_content(self, operator, value): model_domain = [("model", "=", self._name)] - if operator not in expression.NEGATIVE_TERM_OPERATORS: - model_domain += ["|"] * 4 + is_negative = operator in expression.NEGATIVE_TERM_OPERATORS + op = expression.TERM_OPERATORS_NEGATION.get(operator, operator) + model_domain += ["|"] * 4 + model_domain += [("body", "ilike" if op == "%" else op, value)] model_domain += [ - ("record_name", operator, value), - ("subject", operator, value), - ("body", operator, value), - ("email_from", operator, value), - ("reply_to", operator, value), + ("record_name", op, value), + ("subject", op, value), + ("email_from", op, value), + ("reply_to", op, value), ] - recs = self.env["mail.message"].search(model_domain) - return [("id", "in", recs.mapped("res_id"))] + + return [("message_ids", "not any" if is_negative else "any", model_domain)] message_content = fields.Text( help="Message content, to be used only in searches", @@ -56,5 +57,5 @@ def get_view(self, view_id=None, view_type="form", **options): "field", {"name": "message_content", "operator": "%"} ) node.addnext(elem) - res["arch"] = etree.tostring(doc) + res["arch"] = etree.tostring(doc, encoding="unicode") return res diff --git a/base_search_mail_content/readme/CONTRIBUTORS.md b/base_search_mail_content/readme/CONTRIBUTORS.md index 6d2470933..021797921 100644 --- a/base_search_mail_content/readme/CONTRIBUTORS.md +++ b/base_search_mail_content/readme/CONTRIBUTORS.md @@ -7,3 +7,4 @@ - Ernesto Tejeda - David Bañón - Nguyen Minh Chien \<\> +- Joel Estrada ([Moduon](https://moduon.es)) \ No newline at end of file diff --git a/base_search_mail_content/static/description/index.html b/base_search_mail_content/static/description/index.html index ba25cc392..76526c313 100644 --- a/base_search_mail_content/static/description/index.html +++ b/base_search_mail_content/static/description/index.html @@ -372,7 +372,7 @@

Base Search Mail Content

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:97c31f4e41e21c646d32fb6d0e0286ac6d3626ae5bfc0109274b6e1b65724eb5 +!! source digest: sha256:f94db845b3f6bb06a1f792460142c6b5bec4946e13e8fed0b1d5e258b5f03487 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

This module adds the capability to find on any object (e.g. project @@ -462,6 +462,7 @@

Contributors

  • Nguyen Minh Chien <chien@trobz.com>
  • +
  • Joel Estrada (Moduon)
  • diff --git a/base_search_mail_content/tests/test_base_search_mail_content.py b/base_search_mail_content/tests/test_base_search_mail_content.py index 6e18eac4a..5264f888c 100644 --- a/base_search_mail_content/tests/test_base_search_mail_content.py +++ b/base_search_mail_content/tests/test_base_search_mail_content.py @@ -11,7 +11,7 @@ def setUpClass(cls): cls.channel_obj = cls.env["discuss.channel"] def test_base_search_mail_content_1(self): - res = self.channel_obj.search([("message_content", "ilike", "xxxyyyzzz")]) + res = self.channel_obj.search([("message_content", "%", "xxxyyyzzz")]) self.assertFalse(res, "You have a channel with xxxyyyzzz :O") def test_base_search_mail_content_2(self): @@ -28,9 +28,14 @@ def test_base_search_mail_content_3(self): Partner = self.env["res.partner"] partner = Partner.create({"name": "Test Partner"}) partner.message_post( - body="Hello World", + subject="Hello World", ) - partner_find = Partner.search([("message_content", "ilike", "world hell")]) - self.assertFalse(partner_find) - partner_find = Partner.search([("message_content", "%", "world hell")]) - self.assertEqual(partner, partner_find) + partner.message_post( + subject="Lorem ipsum", + ) + # If positive, the partner should be in the result + partner_find = Partner.search([("message_content", "ilike", "Hello World")]) + self.assertIn(partner, partner_find) + # If negative, the partner should be not in the result + partner_find = Partner.search([("message_content", "not ilike", "Hello World")]) + self.assertNotIn(partner, partner_find) diff --git a/mail_activity_team/README.rst b/mail_activity_team/README.rst index 5b5b4d01f..752d566a1 100644 --- a/mail_activity_team/README.rst +++ b/mail_activity_team/README.rst @@ -11,12 +11,12 @@ Mail Activity Team !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:2f89995e87d2922a9f795b1c56269d35e8145119ef8a3b116f8cd62b78b3d178 + !! source digest: sha256:51672fdadfaeec24c2ecce86ab4698c99dfcc197c6f803ab4281af9248dd1c0d !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status - :alt: Alpha + :alt: Beta .. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 @@ -34,11 +34,6 @@ Mail Activity Team This module adds the possibility to assign teams to activities. -.. IMPORTANT:: - This is an alpha version, the data model and design can change at any time without warning. - Only for development or testing purpose, do not use in production. - `More details on development status `_ - **Table of contents** .. contents:: diff --git a/mail_activity_team/__manifest__.py b/mail_activity_team/__manifest__.py index b1f445dcb..fa7d444fd 100644 --- a/mail_activity_team/__manifest__.py +++ b/mail_activity_team/__manifest__.py @@ -5,8 +5,8 @@ { "name": "Mail Activity Team", "summary": "Add Teams to Activities", - "version": "18.0.1.0.0", - "development_status": "Alpha", + "version": "18.0.1.0.1", + "development_status": "Beta", "category": "Social Network", "website": "https://github.com/OCA/mail", "author": "ForgeFlow, Sodexis, Odoo Community Association (OCA)", diff --git a/mail_activity_team/static/description/index.html b/mail_activity_team/static/description/index.html index a837f3714..07fbbce1d 100644 --- a/mail_activity_team/static/description/index.html +++ b/mail_activity_team/static/description/index.html @@ -372,16 +372,10 @@

    Mail Activity Team

    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:2f89995e87d2922a9f795b1c56269d35e8145119ef8a3b116f8cd62b78b3d178 +!! source digest: sha256:51672fdadfaeec24c2ecce86ab4698c99dfcc197c6f803ab4281af9248dd1c0d !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

    +

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

    This module adds the possibility to assign teams to activities.

    -
    -

    Important

    -

    This is an alpha version, the data model and design can change at any time without warning. -Only for development or testing purpose, do not use in production. -More details on development status

    -

    Table of contents

      diff --git a/mail_message_search/README.rst b/mail_message_search/README.rst index 0b2b1b920..5d2d36c3f 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:0b2d4ccefbad330ac90a9abb4a92dcf1483d4df352e85d5be54ab01b3492a20e + !! source digest: sha256:5b7a84e863aa1b256584e7696181a8319ccf3fe658eee3ba07567752da997df7 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/mail_message_search/__manifest__.py b/mail_message_search/__manifest__.py index 827cb5a95..63abed502 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.0", + "version": "18.0.1.0.1", "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 553b47afa..4ce3d3a3b 100644 --- a/mail_message_search/models/mail_thread.py +++ b/mail_message_search/models/mail_thread.py @@ -56,5 +56,5 @@ def get_view(self, view_id=None, view_type="form", **options): # Add message_search in search view elem = etree.Element("field", {"name": "message_search"}) node.addnext(elem) - res["arch"] = etree.tostring(doc) + res["arch"] = etree.tostring(doc, encoding="unicode") return res diff --git a/mail_message_search/static/description/index.html b/mail_message_search/static/description/index.html index acbc45f96..e12043477 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:0b2d4ccefbad330ac90a9abb4a92dcf1483d4df352e85d5be54ab01b3492a20e +!! source digest: sha256:5b7a84e863aa1b256584e7696181a8319ccf3fe658eee3ba07567752da997df7 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

      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 diff --git a/mail_tracking/README.rst b/mail_tracking/README.rst index b14dd5a37..59ce9d064 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:07c993168145785395935a22863e2fddeae5882ea36f606955ed33fb6d6f7d18 + !! source digest: sha256:1dcb2ce7cde25d536c483309729542a0a80d35e24af13a43d9903a6284c3955f !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/mail_tracking/__manifest__.py b/mail_tracking/__manifest__.py index 5091d28cd..ae9df1252 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.4", + "version": "18.0.1.0.5", "category": "Social Network", "website": "https://github.com/OCA/mail", "author": ("Tecnativa, Odoo Community Association (OCA)"), diff --git a/mail_tracking/models/mail_tracking_email.py b/mail_tracking/models/mail_tracking_email.py index f959c1b37..e08df78d8 100644 --- a/mail_tracking/models/mail_tracking_email.py +++ b/mail_tracking/models/mail_tracking_email.py @@ -231,23 +231,28 @@ def _get_allowed_ids(self, ids): ) ) result = self.env.cr.fetchall() - for id_, mail_msg_id, mail_id, partner_id in result: - msg_ids = ( - self.env["mail.message"].search([("id", "=", mail_msg_id)]).ids - if mail_msg_id - else [] - ) + _, msg_ids, mail_ids, partner_ids = zip(*result, strict=True) + msg_ids = ( + self.env["mail.message"] + .search([("id", "in", [x for x in msg_ids if x])]) + .ids + ) + # Only users from group_system can read mail.mail + if self.env.user.has_group("base.group_system"): mail_ids = ( - self.env["mail.mail"].search([("id", "=", mail_id)]).ids - if mail_id - else [] - ) - partner_ids = ( - self.env["res.partner"].search([("id", "=", partner_id)]).ids - if partner_id - else [] + self.env["mail.mail"] + .search([("id", "in", [x for x in mail_ids if x])]) + .ids ) + else: + mail_ids = [] + partner_ids = ( + self.env["res.partner"] + .search([("id", "in", [x for x in partner_ids if x])]) + .ids + ) + for id_, mail_msg_id, mail_id, partner_id in result: if ( (mail_msg_id in msg_ids) or (mail_id in mail_ids) diff --git a/mail_tracking/static/description/index.html b/mail_tracking/static/description/index.html index c5db16433..f55fbf1d0 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:07c993168145785395935a22863e2fddeae5882ea36f606955ed33fb6d6f7d18 +!! source digest: sha256:1dcb2ce7cde25d536c483309729542a0a80d35e24af13a43d9903a6284c3955f !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

      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