diff --git a/mail_send_copy/README.rst b/mail_send_copy/README.rst new file mode 100644 index 000000000..e69de29bb 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..91e081b89 --- /dev/null +++ b/mail_send_copy/__manifest__.py @@ -0,0 +1,15 @@ +# 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": "12.0.1.0.0", + "category": "Social Network", + "author": "GRAP," + "Odoo Community Association (OCA)", + "website": "https://www.github.com/OCA/server-tools", + "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..94db95fc0 --- /dev/null +++ b/mail_send_copy/i18n/fr.po @@ -0,0 +1,27 @@ +# 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" +"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,name:mail_send_copy.model_ir_mail_server +msgid "Mail Server" +msgstr "Serveur d'email" + +#. module: mail_send_copy +#: model:ir.model,name:mail_send_copy.model_res_users +msgid "Users" +msgstr "Utilisateurs" + 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..67feeac53 --- /dev/null +++ b/mail_send_copy/models/ir_mail_server.py @@ -0,0 +1,18 @@ +# 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 odoo import api, models +from email.utils import COMMASPACE + + +class IrMailServer(models.Model): + _inherit = "ir.mail_server" + + @api.model + def send_email(self, message, *args, **kwargs): + if message["Bcc"]: + message["Bcc"] = message["Bcc"].join(COMMASPACE, message["From"]) + else: + message["Bcc"] = message["From"] + return super(IrMailServer, self).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..c0c54bf41 --- /dev/null +++ b/mail_send_copy/readme/DESCRIPTION.rst @@ -0,0 +1,15 @@ +This module extends the functionality of Mail Module to allow users to +receive each mail sent by Odoo, in BCC mode. + +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