diff --git a/mail_outbound_static/README.rst b/mail_outbound_static/README.rst index 21256ec..6fd9b51 100644 --- a/mail_outbound_static/README.rst +++ b/mail_outbound_static/README.rst @@ -14,13 +14,13 @@ Mail Outbound Static :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License: LGPL-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_outbound_static + :target: https://github.com/OCA/social/tree/15.0/mail_outbound_static :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_outbound_static + :target: https://translation.odoo-community.org/projects/social-15-0/social-15-0-mail_outbound_static :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 + :target: https://runbot.odoo-community.org/runbot/205/15.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -68,7 +68,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -105,6 +105,6 @@ 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. +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_outbound_static/__manifest__.py b/mail_outbound_static/__manifest__.py index 2199ff4..ae705fd 100644 --- a/mail_outbound_static/__manifest__.py +++ b/mail_outbound_static/__manifest__.py @@ -1,10 +1,10 @@ -# Copyright 2016-2017 LasLabs Inc. +# Copyright 2016-2022 LasLabs Inc. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). { "name": "Mail Outbound Static", "summary": "Allows you to configure the from header for a mail server.", - "version": "14.0.1.0.0", + "version": "15.0.1.0.0", "category": "Discuss", "website": "https://github.com/OCA/social", "author": "brain-tec AG, LasLabs, Adhoc SA, Odoo Community Association (OCA)", diff --git a/mail_outbound_static/i18n/mail_outbound_static.pot b/mail_outbound_static/i18n/mail_outbound_static.pot index 62d8fc1..cf2c598 100644 --- a/mail_outbound_static/i18n/mail_outbound_static.pot +++ b/mail_outbound_static/i18n/mail_outbound_static.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 14.0\n" +"Project-Id-Version: Odoo Server 15.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-09-03 12:53+0000\n" "PO-Revision-Date: 2020-09-03 12:53+0000\n" diff --git a/mail_outbound_static/static/description/index.html b/mail_outbound_static/static/description/index.html index b741999..aa75a62 100644 --- a/mail_outbound_static/static/description/index.html +++ b/mail_outbound_static/static/description/index.html @@ -367,7 +367,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

+

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

This module brings Odoo outbound emails in to strict compliance with RFC-2822 by allowing for a dynamically configured From header, with the sender’s e-mail being appended into the proper Sender header instead. To accomplish this we:

@@ -417,7 +417,7 @@ server configured in the system.

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.

+feedback.

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

@@ -448,7 +448,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome

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.

+

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_outbound_static/tests/test_ir_mail_server.py b/mail_outbound_static/tests/test_ir_mail_server.py index 8c1969b..14d0929 100644 --- a/mail_outbound_static/tests/test_ir_mail_server.py +++ b/mail_outbound_static/tests/test_ir_mail_server.py @@ -16,28 +16,37 @@ _logger = logging.getLogger(__name__) class TestIrMailServer(TransactionCase): - def setUp(self): - super(TestIrMailServer, self).setUp() - self.email_from = "derp@example.com" - self.email_from_another = "another@example.com" - self.Model = self.env["ir.mail_server"] - self.parameter_model = self.env["ir.config_parameter"] - self._delete_mail_servers() - self.Model.create( + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.email_from = "derp@example.com" + cls.email_from_another = "another@example.com" + cls.Model = cls.env["ir.mail_server"] + cls.parameter_model = cls.env["ir.config_parameter"] + cls._delete_mail_servers() + cls.Model.create( { "name": "localhost", "smtp_host": "localhost", - "smtp_from": self.email_from, + "smtp_from": cls.email_from, } ) message_file = os.path.join( os.path.dirname(os.path.realpath(__file__)), "test.msg" ) with open(message_file, "r") as fh: - self.message = message_from_string(fh.read()) + cls.message = message_from_string(fh.read()) + + @classmethod + def _delete_mail_servers(cls): + """Delete all available mail servers""" + all_mail_servers = cls.Model.search([]) + if all_mail_servers: + all_mail_servers.unlink() def _init_mail_server_domain_whilelist_based(self): self._delete_mail_servers() + self.assertFalse(self.Model.search([])) self.mail_server_domainone = self.Model.create( { "name": "sandbox domainone", @@ -67,13 +76,6 @@ class TestIrMailServer(TransactionCase): _logger.warn(reason) self.skipTest(reason) - def _delete_mail_servers(self): - """Delete all available mail servers""" - all_mail_servers = self.Model.search([]) - if all_mail_servers: - all_mail_servers.unlink() - self.assertFalse(self.Model.search([])) - def _send_mail(self, message=None, mail_server_id=None, smtp_server=None): if message is None: message = self.message @@ -184,7 +186,7 @@ class TestIrMailServer(TransactionCase): email_from = "Mitchell Admin " % domain self._delete_mail_servers() - + self.assertFalse(self.Model.search([])) # Find config values config_smtp_from = tools.config.get("smtp_from") config_smtp_domain_whitelist = tools.config.get("smtp_domain_whitelist") @@ -221,7 +223,7 @@ class TestIrMailServer(TransactionCase): email_from = "Mitchell Admin " % domain self._delete_mail_servers() - + self.assertFalse(self.Model.search([])) self.message.replace_header("From", email_from) message = self._send_mail() self.assertEqual(message["From"], email_from)