Skip to content

Commit

Permalink
[ADD] mail_send_bcc
Browse files Browse the repository at this point in the history
  • Loading branch information
legalsylvain committed Nov 13, 2019
1 parent eeedcbd commit c42a3cc
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 0 deletions.
Empty file added mail_send_bcc/README.rst
Empty file.
1 change: 1 addition & 0 deletions mail_send_bcc/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
15 changes: 15 additions & 0 deletions mail_send_bcc/__manifest__.py
Original file line number Diff line number Diff line change
@@ -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 Bcc",
"summary": "Send to you in Bcc mode each mail sent by Odoo",
"version": "12.0.1.0.0",
"category": "Social Network",
"author": "GRAP"
"Odoo Community Association (OCA)",
"website": "https://github.com/OCA/server-tools",
"license": "AGPL-3",
"depends": ["mail"],
"installable": True,
}
27 changes: 27 additions & 0 deletions mail_send_bcc/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mail_send_bcc
#
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_bcc
#: model:ir.model,name:mail_send_bcc.model_ir_mail_server
msgid "Mail Server"
msgstr "Serveur d'email"

#. module: mail_send_bcc
#: model:ir.model,name:mail_send_bcc.model_res_users
msgid "Users"
msgstr "Utilisateurs"

1 change: 1 addition & 0 deletions mail_send_bcc/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import ir_mail_server
18 changes: 18 additions & 0 deletions mail_send_bcc/models/ir_mail_server.py
Original file line number Diff line number Diff line change
@@ -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)
1 change: 1 addition & 0 deletions mail_send_bcc/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Sylvain LE GAL (https://www.twitter.com/legalsylvain)
15 changes: 15 additions & 0 deletions mail_send_bcc/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -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
Binary file added mail_send_bcc/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c42a3cc

Please sign in to comment.