diff --git a/mail_send_copy/README.rst b/mail_send_copy/README.rst new file mode 100644 index 000000000..f45386cdf --- /dev/null +++ b/mail_send_copy/README.rst @@ -0,0 +1,99 @@ +====================== +Mail - Send Email Copy +====================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |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/14.0/mail_send_copy + :alt: OCA/social +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/social-14-0/social-14-0-mail_send_copy + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/205/14.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + + +This module extends the functionality of Mail Module adding sender in +BBC field to receive a copy of each mail sent by Odoo. + +.. warning:: + + Sender can be different from the current user according email + template in use. + + +Use Case +-------- + +This feature can be usefull for users: + +* to be sure the mail was sent because Odoo send mail depending of + some partner parameters + +* to have the whole conversation if the partner writes an answer and if + mailbox manages thread by object + +* to be sure smtp server works + +**Table of contents** + +.. contents:: + :local: + +Known issues / Roadmap +====================== + +* Add the possibility to select if the mail is sent in "Cc" or in "Bcc" mode. + +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 smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* GRAP + +Contributors +~~~~~~~~~~~~ + +* Sylvain LE GAL (https://www.twitter.com/legalsylvain) + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/social `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/mail_send_copy/__init__.py b/mail_send_copy/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/mail_send_copy/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/mail_send_copy/__manifest__.py b/mail_send_copy/__manifest__.py new file mode 100644 index 000000000..b6517654c --- /dev/null +++ b/mail_send_copy/__manifest__.py @@ -0,0 +1,14 @@ +# Copyright (C) 2014 - Today: GRAP (http://www.grap.coop) +# @author: Sylvain LE GAL (https://twitter.com/legalsylvain) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +{ + "name": "Mail - Send Email Copy", + "summary": "Send to you a copy of each mail sent by Odoo", + "version": "15.0.1.0.0", + "category": "Social Network", + "author": "GRAP," "Odoo Community Association (OCA)", + "website": "https://github.com/OCA/social", + "license": "AGPL-3", + "depends": ["mail"], + "installable": True, +} diff --git a/mail_send_copy/i18n/fr.po b/mail_send_copy/i18n/fr.po new file mode 100644 index 000000000..be775e023 --- /dev/null +++ b/mail_send_copy/i18n/fr.po @@ -0,0 +1,40 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_send_copy +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-11-13 10:48+0000\n" +"PO-Revision-Date: 2019-11-13 10:48+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: mail_send_copy +#: model:ir.model.fields,field_description:mail_send_copy.field_ir_mail_server__display_name +msgid "Display Name" +msgstr "" + +#. module: mail_send_copy +#: model:ir.model.fields,field_description:mail_send_copy.field_ir_mail_server__id +msgid "ID" +msgstr "" + +#. module: mail_send_copy +#: model:ir.model.fields,field_description:mail_send_copy.field_ir_mail_server____last_update +msgid "Last Modified on" +msgstr "" + +#. module: mail_send_copy +#: model:ir.model,name:mail_send_copy.model_ir_mail_server +msgid "Mail Server" +msgstr "Serveur d'email" + +#~ msgid "Users" +#~ msgstr "Utilisateurs" diff --git a/mail_send_copy/i18n/mail_send_copy.pot b/mail_send_copy/i18n/mail_send_copy.pot new file mode 100644 index 000000000..bf95aa3d7 --- /dev/null +++ b/mail_send_copy/i18n/mail_send_copy.pot @@ -0,0 +1,34 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_send_copy +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: mail_send_copy +#: model:ir.model.fields,field_description:mail_send_copy.field_ir_mail_server__display_name +msgid "Display Name" +msgstr "" + +#. module: mail_send_copy +#: model:ir.model.fields,field_description:mail_send_copy.field_ir_mail_server__id +msgid "ID" +msgstr "" + +#. module: mail_send_copy +#: model:ir.model.fields,field_description:mail_send_copy.field_ir_mail_server____last_update +msgid "Last Modified on" +msgstr "" + +#. module: mail_send_copy +#: model:ir.model,name:mail_send_copy.model_ir_mail_server +msgid "Mail Server" +msgstr "" diff --git a/mail_send_copy/models/__init__.py b/mail_send_copy/models/__init__.py new file mode 100644 index 000000000..abbcb50bd --- /dev/null +++ b/mail_send_copy/models/__init__.py @@ -0,0 +1 @@ +from . import ir_mail_server diff --git a/mail_send_copy/models/ir_mail_server.py b/mail_send_copy/models/ir_mail_server.py new file mode 100644 index 000000000..3ae8cee11 --- /dev/null +++ b/mail_send_copy/models/ir_mail_server.py @@ -0,0 +1,21 @@ +# Copyright (C) 2014 - Today: GRAP (http://www.grap.coop) +# @author: Sylvain LE GAL (https://twitter.com/legalsylvain) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from email.utils import COMMASPACE + +from odoo import api, models + + +class IrMailServer(models.Model): + _inherit = "ir.mail_server" + + @api.model + def send_email(self, message, *args, **kwargs): + do_not_send_copy = self.env.context.get("do_not_send_copy", False) + if not do_not_send_copy: + if message["Bcc"]: + message["Bcc"] = message["Bcc"].join(COMMASPACE, message["From"]) + else: + message["Bcc"] = message["From"] + return super().send_email(message, *args, **kwargs) diff --git a/mail_send_copy/readme/CONTRIBUTORS.rst b/mail_send_copy/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..e1525ce04 --- /dev/null +++ b/mail_send_copy/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Sylvain LE GAL (https://www.twitter.com/legalsylvain) diff --git a/mail_send_copy/readme/DESCRIPTION.rst b/mail_send_copy/readme/DESCRIPTION.rst new file mode 100644 index 000000000..72055e370 --- /dev/null +++ b/mail_send_copy/readme/DESCRIPTION.rst @@ -0,0 +1,22 @@ + +This module extends the functionality of Mail Module adding sender in +BBC field to receive a copy of each mail sent by Odoo. + +.. warning:: + + Sender can be different from the current user according email + template in use. + + +Use Case +-------- + +This feature can be usefull for users: + +* to be sure the mail was sent because Odoo send mail depending of + some partner parameters + +* to have the whole conversation if the partner writes an answer and if + mailbox manages thread by object + +* to be sure smtp server works diff --git a/mail_send_copy/readme/ROADMAP.rst b/mail_send_copy/readme/ROADMAP.rst new file mode 100644 index 000000000..4580be0e0 --- /dev/null +++ b/mail_send_copy/readme/ROADMAP.rst @@ -0,0 +1 @@ +* Add the possibility to select if the mail is sent in "Cc" or in "Bcc" mode. diff --git a/mail_send_copy/static/description/icon.png b/mail_send_copy/static/description/icon.png new file mode 100644 index 000000000..9414ac9fd Binary files /dev/null and b/mail_send_copy/static/description/icon.png differ diff --git a/mail_send_copy/static/description/index.html b/mail_send_copy/static/description/index.html new file mode 100644 index 000000000..f8a0280ea --- /dev/null +++ b/mail_send_copy/static/description/index.html @@ -0,0 +1,443 @@ + + + + + + +Mail - Send Email Copy + + + +
+

Mail - Send Email Copy

+ + +

Beta License: AGPL-3 OCA/social Translate me on Weblate Try me on Runbot

+

This module extends the functionality of Mail Module adding sender in +BBC field to receive a copy of each mail sent by Odoo.

+
+

Warning

+

Sender can be different from the current user according email +template in use.

+
+
+

Use Case

+

This feature can be usefull for users:

+
    +
  • to be sure the mail was sent because Odoo send mail depending of +some partner parameters
  • +
  • to have the whole conversation if the partner writes an answer and if +mailbox manages thread by object
  • +
  • to be sure smtp server works
  • +
+

Table of contents

+ +
+

Known issues / Roadmap

+
    +
  • Add the possibility to select if the mail is sent in “Cc” or in “Bcc” mode.
  • +
+
+
+

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 smashing it by providing a detailed and welcomed +feedback.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • GRAP
  • +
+
+ +
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

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

+

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

+
+
+
+
+ + diff --git a/setup/mail_send_copy/odoo/addons/mail_send_copy b/setup/mail_send_copy/odoo/addons/mail_send_copy new file mode 120000 index 000000000..01fab56f8 --- /dev/null +++ b/setup/mail_send_copy/odoo/addons/mail_send_copy @@ -0,0 +1 @@ +../../../../mail_send_copy \ No newline at end of file diff --git a/setup/mail_send_copy/setup.py b/setup/mail_send_copy/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/mail_send_copy/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)