diff --git a/base_mail_bcc/README.rst b/base_mail_bcc/README.rst deleted file mode 100644 index b413f2fe..00000000 --- a/base_mail_bcc/README.rst +++ /dev/null @@ -1,58 +0,0 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 - -============== -BCC all emails -============== - -This module extends the email mechanism to allow for sending a blind carbon copy (BCC) -of all outgoing emails to configurable e-mail addresses. - -Configuration -============= - -To configure this module, you need to: - -* Go to Settings > Parameters > System Parameters -* Create a new entry with key `base_mail_bcc.bcc_to` and set the desired e-mail addresses for BCC as value. This value must be a comma-separated list of valid e-mail addresses. - -.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas - :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/205/8.0 - -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. - -Credits -======= - -Images ------- - -* Odoo Community Association: `Icon `_. - -Contributors ------------- - -* Thomas Rehn - -Maintainer ----------- - -.. image:: https://odoo-community.org/logo.png - :alt: Odoo Community Association - :target: https://odoo-community.org - -This module is maintained by the OCA. - -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. - -To contribute to this module, please visit https://odoo-community.org. diff --git a/base_mail_bcc/__init__.py b/base_mail_bcc/__init__.py index 251c2d64..d879be5b 100644 --- a/base_mail_bcc/__init__.py +++ b/base_mail_bcc/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# © 2014-2016 Thomas Rehn (initOS GmbH) +# © 2014-2019 Thomas Rehn (initOS GmbH) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import models diff --git a/base_mail_bcc/__openerp__.py b/base_mail_bcc/__manifest__.py similarity index 76% rename from base_mail_bcc/__openerp__.py rename to base_mail_bcc/__manifest__.py index 3bd713ec..419c178d 100644 --- a/base_mail_bcc/__openerp__.py +++ b/base_mail_bcc/__manifest__.py @@ -1,18 +1,14 @@ # -*- coding: utf-8 -*- -# © 2014-2016 Thomas Rehn (initOS GmbH) +# © 2014-2019 Thomas Rehn (initOS GmbH) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "BCC all emails", - "version": "8.0.1.0.0", + "version": "10.0.1.0.0", "depends": ["base"], 'author': 'initOS GmbH, Odoo Community Association (OCA)', "category": "Tools", 'license': 'AGPL-3', - 'data': [ - ], 'demo': ['demo/mail_bcc_demo.xml'], - 'test': [ - ], 'installable': True, 'auto_install': False, } diff --git a/base_mail_bcc/demo/mail_bcc_demo.xml b/base_mail_bcc/demo/mail_bcc_demo.xml index 509d97d6..2fc6e8b5 100644 --- a/base_mail_bcc/demo/mail_bcc_demo.xml +++ b/base_mail_bcc/demo/mail_bcc_demo.xml @@ -1,9 +1,9 @@ - + base_mail_bcc.bcc_to root@example.com - + diff --git a/base_mail_bcc/models/__init__.py b/base_mail_bcc/models/__init__.py index 721d9b73..e7d4223b 100644 --- a/base_mail_bcc/models/__init__.py +++ b/base_mail_bcc/models/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# © 2014-2016 Thomas Rehn (initOS GmbH) +# © 2014-2019 Thomas Rehn (initOS GmbH) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import ir_mail_server diff --git a/base_mail_bcc/models/ir_mail_server.py b/base_mail_bcc/models/ir_mail_server.py index 7158d60c..077fc489 100644 --- a/base_mail_bcc/models/ir_mail_server.py +++ b/base_mail_bcc/models/ir_mail_server.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- -# © 2014-2017 Thomas Rehn (initOS GmbH) +# © 2014-2019 Thomas Rehn (initOS GmbH) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from email.Utils import COMMASPACE -from openerp import models, api +from odoo import api, models class IrMailServer(models.Model): @@ -34,8 +34,12 @@ class IrMailServer(models.Model): ) return super(IrMailServer, self).send_email( - message, mail_server_id=mail_server_id, smtp_server=smtp_server, - smtp_port=smtp_port, smtp_user=smtp_user, - smtp_password=smtp_password, smtp_encryption=smtp_encryption, + message, + mail_server_id=mail_server_id, + smtp_server=smtp_server, + smtp_port=smtp_port, + smtp_user=smtp_user, + smtp_password=smtp_password, + smtp_encryption=smtp_encryption, smtp_debug=smtp_debug ) diff --git a/base_mail_bcc/readme/DESCRIPTION.rst b/base_mail_bcc/readme/DESCRIPTION.rst new file mode 100644 index 00000000..9e1e866d --- /dev/null +++ b/base_mail_bcc/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module extends the email mechanism to allow for sending a blind carbon copy (BCC) +of all outgoing emails to configurable e-mail addresses. diff --git a/base_mail_bcc/readme/INSTALL.rst b/base_mail_bcc/readme/INSTALL.rst new file mode 100644 index 00000000..8a9d18bd --- /dev/null +++ b/base_mail_bcc/readme/INSTALL.rst @@ -0,0 +1,4 @@ +To configure this module, you need to: + +* Go to Settings > Parameters > System Parameters +* Create a new entry with key `base_mail_bcc.bcc_to` and set the desired e-mail addresses for BCC as value. This value must be a comma-separated list of valid e-mail addresses. diff --git a/base_mail_bcc/tests/__init__.py b/base_mail_bcc/tests/__init__.py index aad01d1b..7eec64f6 100644 --- a/base_mail_bcc/tests/__init__.py +++ b/base_mail_bcc/tests/__init__.py @@ -1,4 +1,4 @@ # -*- coding: utf-8 -*- -# © 2017 initOS GmbH +# © 2017-2019 initOS GmbH # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import test_base_mail_bcc diff --git a/base_mail_bcc/tests/test_base_mail_bcc.py b/base_mail_bcc/tests/test_base_mail_bcc.py index 81dea2af..6b44326c 100644 --- a/base_mail_bcc/tests/test_base_mail_bcc.py +++ b/base_mail_bcc/tests/test_base_mail_bcc.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- -# © 2017 initOS GmbH +# © 2017-2019 initOS GmbH # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). import mock -from openerp.tests.common import TransactionCase +from odoo.tests.common import TransactionCase class TestBaseMailBcc(TransactionCase):