Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0] [MIG] email_template_config #301

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions email_template_config/README.rst
Original file line number Diff line number Diff line change
@@ -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 <https://github.com/coopiteasy/addons/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 <https://github.com/coopiteasy/addons/issues/new?body=module:%20email_template_config%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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 <https://github.com/coopiteasy/addons/tree/14.0/email_template_config>`_ project on GitHub.

You are welcome to contribute.
1 change: 1 addition & 0 deletions email_template_config/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
18 changes: 18 additions & 0 deletions email_template_config/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2018-Coop IT Easy SC (<http://www.coopiteasy.be>)
# - Houssine BAKKALI - <[email protected]>
# 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,
}
39 changes: 39 additions & 0 deletions email_template_config/i18n/email_template_config.pot
Original file line number Diff line number Diff line change
@@ -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 ""
1 change: 1 addition & 0 deletions email_template_config/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import mail_template
23 changes: 23 additions & 0 deletions email_template_config/models/mail_template.py
Original file line number Diff line number Diff line change
@@ -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,
)
Empty file.
Empty file.
Loading
Loading