diff --git a/email_template_config/README.rst b/email_template_config/README.rst new file mode 100644 index 000000000..3bd47c347 --- /dev/null +++ b/email_template_config/README.rst @@ -0,0 +1,51 @@ +=================== +Email Configuration +=================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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-coopiteasy%2Faddons-lightgray.png?logo=github + :target: https://github.com/coopiteasy/addons/tree/14.0/email_template_config + :alt: coopiteasy/addons + +|badge1| |badge2| |badge3| + + +**Table of contents** + +.. contents:: + :local: + +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 +~~~~~~~ + +* Coop IT Easy SC + +Maintainers +~~~~~~~~~~~ + +This module is part of the `coopiteasy/addons `_ project on GitHub. + +You are welcome to contribute. diff --git a/email_template_config/__init__.py b/email_template_config/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/email_template_config/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/email_template_config/__manifest__.py b/email_template_config/__manifest__.py new file mode 100644 index 000000000..02c9da8d8 --- /dev/null +++ b/email_template_config/__manifest__.py @@ -0,0 +1,18 @@ +# Copyright 2018-Coop IT Easy SC () +# - Houssine BAKKALI - +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +{ + "name": "Email Configuration", + "version": "16.0.1.0.0", + "depends": ["mail"], + "author": "Coop IT Easy SC", + "category": "Discuss", + "website": "https://github.com/coopiteasy/addons", + "license": "AGPL-3", + "summary": """ + This module extends the email in order to force some behaviours + configured in the mail template(e.g. force send mail or not). + """, + "data": ["views/mail_template_views.xml"], + "installable": True, +} diff --git a/email_template_config/i18n/email_template_config.pot b/email_template_config/i18n/email_template_config.pot new file mode 100644 index 000000000..0a9313ffd --- /dev/null +++ b/email_template_config/i18n/email_template_config.pot @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * email_template_config +# +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: email_template_config +#: model:ir.model.fields,field_description:email_template_config.field_mail_template__display_name +msgid "Display Name" +msgstr "" + +#. module: email_template_config +#: model:ir.model,name:email_template_config.model_mail_template +msgid "Email Templates" +msgstr "" + +#. module: email_template_config +#: model:ir.model.fields,field_description:email_template_config.field_mail_template__force_email_send +msgid "Force mail send?" +msgstr "" + +#. module: email_template_config +#: model:ir.model.fields,field_description:email_template_config.field_mail_template__id +msgid "ID" +msgstr "" + +#. module: email_template_config +#: model:ir.model.fields,field_description:email_template_config.field_mail_template____last_update +msgid "Last Modified on" +msgstr "" diff --git a/email_template_config/models/__init__.py b/email_template_config/models/__init__.py new file mode 100644 index 000000000..44e83956e --- /dev/null +++ b/email_template_config/models/__init__.py @@ -0,0 +1 @@ +from . import mail_template diff --git a/email_template_config/models/mail_template.py b/email_template_config/models/mail_template.py new file mode 100644 index 000000000..40fa94c3a --- /dev/null +++ b/email_template_config/models/mail_template.py @@ -0,0 +1,23 @@ +from odoo import fields, models + + +class MailTemplate(models.Model): + _inherit = "mail.template" + + force_email_send = fields.Boolean(string="Force mail send?") + + def send_mail( + self, + res_id, + force_send=False, + raise_exception=False, + email_values=None, + email_layout_xmlid=False, + ): + return super(MailTemplate, self).send_mail( + res_id, + force_send=self.force_email_send, + raise_exception=raise_exception, + email_values=email_values, + email_layout_xmlid=email_layout_xmlid, + ) diff --git a/email_template_config/readme/CONTRIBUTORS.rst b/email_template_config/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..e69de29bb diff --git a/email_template_config/readme/DESCRIPTION.rst b/email_template_config/readme/DESCRIPTION.rst new file mode 100644 index 000000000..e69de29bb diff --git a/email_template_config/static/description/index.html b/email_template_config/static/description/index.html new file mode 100644 index 000000000..e82bcc5b3 --- /dev/null +++ b/email_template_config/static/description/index.html @@ -0,0 +1,406 @@ + + + + + + +Email Configuration + + + +
+

Email Configuration

+ + +

Beta License: AGPL-3 coopiteasy/addons

+

Table of contents

+ +
+

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

+
    +
  • Coop IT Easy SCRLfs
  • +
+
+
+

Maintainers

+

This module is part of the coopiteasy/addons project on GitHub.

+

You are welcome to contribute.

+
+
+
+ + diff --git a/email_template_config/views/mail_template_views.xml b/email_template_config/views/mail_template_views.xml new file mode 100644 index 000000000..b44ac5acd --- /dev/null +++ b/email_template_config/views/mail_template_views.xml @@ -0,0 +1,13 @@ + + + + email.template.form + mail.template + + + + + + + + diff --git a/setup/email_template_config/odoo/addons/email_template_config b/setup/email_template_config/odoo/addons/email_template_config new file mode 120000 index 000000000..ef1918cf2 --- /dev/null +++ b/setup/email_template_config/odoo/addons/email_template_config @@ -0,0 +1 @@ +../../../../email_template_config \ No newline at end of file diff --git a/setup/email_template_config/setup.py b/setup/email_template_config/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/email_template_config/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)