From 03adcabb8217ba9bed0411e715f6a32011d7d618 Mon Sep 17 00:00:00 2001 From: trisdoan Date: Tue, 5 Nov 2024 11:59:46 +0700 Subject: [PATCH] [MIG] mail_composer_cc_bcc: Migration to 18.0 --- mail_composer_cc_bcc/README.rst | 28 +++++++++---------- mail_composer_cc_bcc/__manifest__.py | 4 +-- mail_composer_cc_bcc/models/mail_mail.py | 7 +++-- mail_composer_cc_bcc/models/mail_thread.py | 1 + mail_composer_cc_bcc/readme/CREDITS.md | 3 +- .../static/description/index.html | 20 ++++++------- 6 files changed, 33 insertions(+), 30 deletions(-) diff --git a/mail_composer_cc_bcc/README.rst b/mail_composer_cc_bcc/README.rst index 4e238935..6a55e52f 100644 --- a/mail_composer_cc_bcc/README.rst +++ b/mail_composer_cc_bcc/README.rst @@ -16,14 +16,14 @@ Email CC and BCC .. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 -.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github - :target: https://github.com/OCA/social/tree/18.0/mail_composer_cc_bcc - :alt: OCA/social +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmail-lightgray.png?logo=github + :target: https://github.com/OCA/mail/tree/18.0/mail_composer_cc_bcc + :alt: OCA/mail .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/social-18-0/social-18-0-mail_composer_cc_bcc + :target: https://translation.odoo-community.org/projects/mail-18-0/mail-18-0-mail_composer_cc_bcc :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/social&target_branch=18.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/mail&target_branch=18.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -68,8 +68,8 @@ In template form there are two fields to set cc and bcc emails. |email_template_form_cc_bcc| -.. |res_company_form_default_cc_bcc| image:: https://raw.githubusercontent.com/OCA/social/18.0/mail_composer_cc_bcc/static/img/res_company_form_default_cc_bcc.png -.. |email_template_form_cc_bcc| image:: https://raw.githubusercontent.com/OCA/social/18.0/mail_composer_cc_bcc/static/img/email_template_form_cc_bcc.png +.. |res_company_form_default_cc_bcc| image:: https://raw.githubusercontent.com/OCA/mail/18.0/mail_composer_cc_bcc/static/img/res_company_form_default_cc_bcc.png +.. |email_template_form_cc_bcc| image:: https://raw.githubusercontent.com/OCA/mail/18.0/mail_composer_cc_bcc/static/img/email_template_form_cc_bcc.png Usage ===== @@ -85,16 +85,16 @@ corresponding mail composer's fields. |image1| -.. |image| image:: https://raw.githubusercontent.com/OCA/social/18.0/mail_composer_cc_bcc/static/img/mail_compose_message_default_cc_bcc.png -.. |image1| image:: https://raw.githubusercontent.com/OCA/social/18.0/mail_composer_cc_bcc/static/img/mail_compose_message_template_cc_bcc.png +.. |image| image:: https://raw.githubusercontent.com/OCA/mail/18.0/mail_composer_cc_bcc/static/img/mail_compose_message_default_cc_bcc.png +.. |image1| image:: https://raw.githubusercontent.com/OCA/mail/18.0/mail_composer_cc_bcc/static/img/mail_compose_message_template_cc_bcc.png Bug Tracker =========== -Bugs are tracked on `GitHub Issues `_. +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 -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -118,8 +118,8 @@ Contributors Other credits ------------- -The creation and migration from 16.0 to 17.0 of this module were -financially supported by Camptocamp. +The creation and migration of this module from 16.0 to 17.0, and then +17.0 to 18.0 were financially supported by Camptocamp. Maintainers ----------- @@ -142,6 +142,6 @@ Current `maintainer `__: |maintainer-trisdoan| -This module is part of the `OCA/social `_ project on GitHub. +This module is part of the `OCA/mail `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/mail_composer_cc_bcc/__manifest__.py b/mail_composer_cc_bcc/__manifest__.py index fded5edf..099e43e5 100644 --- a/mail_composer_cc_bcc/__manifest__.py +++ b/mail_composer_cc_bcc/__manifest__.py @@ -3,10 +3,10 @@ { "name": "Email CC and BCC", "summary": "This module enables sending mail to CC and BCC partners in mail composer form.", # noqa: E501 - "version": "17.0.1.0.0", + "version": "18.0.1.0.0", "development_status": "Alpha", "category": "Social", - "website": "https://github.com/OCA/social", + "website": "https://github.com/OCA/mail", "author": "Camptocamp, Odoo Community Association (OCA)", "maintainers": ["trisdoan"], "license": "AGPL-3", diff --git a/mail_composer_cc_bcc/models/mail_mail.py b/mail_composer_cc_bcc/models/mail_mail.py index 1df9743c..a43830f9 100644 --- a/mail_composer_cc_bcc/models/mail_mail.py +++ b/mail_composer_cc_bcc/models/mail_mail.py @@ -22,10 +22,13 @@ class MailMail(models.Model): email_bcc = fields.Char("Bcc", help="Blind Cc message recipients") - def _prepare_outgoing_list(self, recipients_follower_status=None): + def _prepare_outgoing_list( + self, mail_server=False, recipients_follower_status=None + ): # First, return if we're not coming from the Mail Composer res = super()._prepare_outgoing_list( - recipients_follower_status=recipients_follower_status + mail_server=mail_server, + recipients_follower_status=recipients_follower_status, ) is_out_of_scope = len(self.ids) > 1 is_from_composer = self.env.context.get("is_from_composer", False) diff --git a/mail_composer_cc_bcc/models/mail_thread.py b/mail_composer_cc_bcc/models/mail_thread.py index 01c5b501..02b60e32 100644 --- a/mail_composer_cc_bcc/models/mail_thread.py +++ b/mail_composer_cc_bcc/models/mail_thread.py @@ -93,6 +93,7 @@ def _notify_get_recipients(self, message, msg_vals, **kwargs): "notif": data.get("notif") and data.get("notif") or notif, "type": msg_type, "is_follower": data.get("is_follower"), + "uid": False, } rdata.append(pdata) return rdata diff --git a/mail_composer_cc_bcc/readme/CREDITS.md b/mail_composer_cc_bcc/readme/CREDITS.md index 2dae1962..53026c98 100644 --- a/mail_composer_cc_bcc/readme/CREDITS.md +++ b/mail_composer_cc_bcc/readme/CREDITS.md @@ -1,2 +1 @@ -The creation and migration from 16.0 to 17.0 of this module were -financially supported by Camptocamp. +The creation and migration of this module from 16.0 to 17.0, and then 17.0 to 18.0 were financially supported by Camptocamp. diff --git a/mail_composer_cc_bcc/static/description/index.html b/mail_composer_cc_bcc/static/description/index.html index 7bc2b1c4..3572c948 100644 --- a/mail_composer_cc_bcc/static/description/index.html +++ b/mail_composer_cc_bcc/static/description/index.html @@ -369,7 +369,7 @@

Email CC and BCC

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:74b49ed221c9dcabf5962c9efa43cc1b8dff0b08074da5a2ec9b685adbb5868f !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

+

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

Odoo native does not support defining a Cc field in the Mail Composer by default; instead, it only has a unique Recipients fields, which is confusing for a lot of end users.

@@ -405,29 +405,29 @@

Features

Configuration

In company form there are two fields to set default cc and bcc partners.

-res_company_form_default_cc_bcc
+res_company_form_default_cc_bcc

In template form there are two fields to set cc and bcc emails.

-email_template_form_cc_bcc
+email_template_form_cc_bcc

Usage

The partners cc and bcc from company form will be used to fill in mail composer form.

-image
+image

When select a template that has cc and/or bcc emails, the emails will be used to lookup partners then found partners will be added to corresponding mail composer’s fields.

-image1
+image1

Bug Tracker

-

Bugs are tracked on GitHub Issues. +

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 -feedback.

+feedback.

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

@@ -456,8 +456,8 @@

Contributors

Other credits

-

The creation and migration from 16.0 to 17.0 of this module were -financially supported by Camptocamp.

+

The creation and migration of this module from 16.0 to 17.0, and then +17.0 to 18.0 were financially supported by Camptocamp.

Maintainers

@@ -470,7 +470,7 @@

Maintainers

promote its widespread use.

Current maintainer:

trisdoan

-

This module is part of the OCA/social project on GitHub.

+

This module is part of the OCA/mail project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.