mirror of https://github.com/OCA/social.git
[IMP] mail_notification_custom_subject: pre-commit auto fixes
parent
af068ba09a
commit
f7b15d4e6f
|
@ -17,19 +17,19 @@ Mail Notification Custom Subject
|
|||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/social/tree/15.0/mail_notification_custom_subject
|
||||
:target: https://github.com/OCA/social/tree/17.0/mail_notification_custom_subject
|
||||
:alt: OCA/social
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/social-15-0/social-15-0-mail_notification_custom_subject
|
||||
:target: https://translation.odoo-community.org/projects/social-17-0/social-17-0-mail_notification_custom_subject
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
||||
:target: https://runboat.odoo-community.org/builds?repo=OCA/social&target_branch=15.0
|
||||
:target: https://runboat.odoo-community.org/builds?repo=OCA/social&target_branch=17.0
|
||||
:alt: Try me on Runboat
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|
||||
This module allows you to specify templates to override the subject on the notification
|
||||
emails sent by Odoo
|
||||
This module allows you to specify templates to override the subject on
|
||||
the notification emails sent by Odoo
|
||||
|
||||
**Table of contents**
|
||||
|
||||
|
@ -39,23 +39,29 @@ emails sent by Odoo
|
|||
Configuration
|
||||
=============
|
||||
|
||||
- Activate access to **Technical Features** (debug mode).
|
||||
|
||||
* Activate access to **Technical Features** (debug mode).
|
||||
* Go to **Settings > Technical > Email > Subject Replacement Templates**
|
||||
* Create a new template.
|
||||
- Go to **Settings > Technical > Email > Subject Replacement
|
||||
Templates**
|
||||
|
||||
* The field **Model** specifies the model to which the subject template should apply in the notification emails sent by Odoo.
|
||||
* The field **Subject Template** accepts `Jinja <https://jinja.palletsprojects.com/en/2.11.x/>`__ expressions.
|
||||
* The field **Replace** specifies if the template should replace existing content or append to it.
|
||||
- Create a new template.
|
||||
|
||||
- The field **Model** specifies the model to which the subject
|
||||
template should apply in the notification emails sent by Odoo.
|
||||
- The field **Subject Template** accepts
|
||||
`Jinja <https://jinja.palletsprojects.com/en/2.11.x/>`__
|
||||
expressions.
|
||||
- The field **Replace** specifies if the template should replace
|
||||
existing content or append to it.
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
To use this module, you need to:
|
||||
|
||||
* Open the chatter in Odoo (e.g. Open an Invoice).
|
||||
* Send a message.
|
||||
* Observe the rendered Subject template.
|
||||
- Open the chatter in Odoo (e.g. Open an Invoice).
|
||||
- Send a message.
|
||||
- Observe the rendered Subject template.
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
@ -63,7 +69,7 @@ Bug Tracker
|
|||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/social/issues>`_.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
||||
`feedback <https://github.com/OCA/social/issues/new?body=module:%20mail_notification_custom_subject%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
`feedback <https://github.com/OCA/social/issues/new?body=module:%20mail_notification_custom_subject%0Aversion:%2017.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.
|
||||
|
||||
|
@ -71,28 +77,30 @@ Credits
|
|||
=======
|
||||
|
||||
Authors
|
||||
~~~~~~~
|
||||
-------
|
||||
|
||||
* Tecnativa
|
||||
|
||||
Contributors
|
||||
~~~~~~~~~~~~
|
||||
------------
|
||||
|
||||
* Tecnativa <https://www.tecnativa.com>
|
||||
- Tecnativa <https://www.tecnativa.com>
|
||||
|
||||
* Pedro M. Baeza
|
||||
* João Marques
|
||||
* Carlos Roca
|
||||
* Víctor Martínez
|
||||
- Pedro M. Baeza
|
||||
- João Marques
|
||||
- Carlos Roca
|
||||
- Víctor Martínez
|
||||
|
||||
* Versada <https://versada.eu>
|
||||
* Naglis Jonaitis
|
||||
- Versada <https://versada.eu>
|
||||
|
||||
* Moduon <https://www.moduon.team>
|
||||
* Eduardo de Miguel
|
||||
- Naglis Jonaitis
|
||||
|
||||
- Moduon <https://www.moduon.team>
|
||||
|
||||
- Eduardo de Miguel
|
||||
|
||||
Maintainers
|
||||
~~~~~~~~~~~
|
||||
-----------
|
||||
|
||||
This module is maintained by the OCA.
|
||||
|
||||
|
@ -112,6 +120,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|
|||
|
||||
|maintainer-yajo|
|
||||
|
||||
This module is part of the `OCA/social <https://github.com/OCA/social/tree/15.0/mail_notification_custom_subject>`_ project on GitHub.
|
||||
This module is part of the `OCA/social <https://github.com/OCA/social/tree/17.0/mail_notification_custom_subject>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
|
|
@ -26,7 +26,7 @@ class MailThread(models.AbstractModel):
|
|||
attachment_ids=None,
|
||||
add_sign=True,
|
||||
record_name=False,
|
||||
**kwargs
|
||||
**kwargs,
|
||||
):
|
||||
if subtype_xmlid:
|
||||
subtype_id = self.env["ir.model.data"]._xmlid_to_res_id(
|
||||
|
@ -60,9 +60,7 @@ class MailThread(models.AbstractModel):
|
|||
template_src=template.subject_template,
|
||||
model=self._name,
|
||||
res_ids=[self.id],
|
||||
)[
|
||||
self.id
|
||||
]
|
||||
)[self.id]
|
||||
if template.position == "replace":
|
||||
subject = rendered_subject_template
|
||||
elif template.position == "append_before":
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
[build-system]
|
||||
requires = ["whool"]
|
||||
build-backend = "whool.buildapi"
|
|
@ -0,0 +1,13 @@
|
|||
- Activate access to **Technical Features** (debug mode).
|
||||
|
||||
- Go to **Settings \> Technical \> Email \> Subject Replacement
|
||||
Templates**
|
||||
|
||||
- Create a new template.
|
||||
|
||||
> - The field **Model** specifies the model to which the subject
|
||||
> template should apply in the notification emails sent by Odoo.
|
||||
> - The field **Subject Template** accepts
|
||||
> [Jinja](https://jinja.palletsprojects.com/en/2.11.x/) expressions.
|
||||
> - The field **Replace** specifies if the template should replace
|
||||
> existing content or append to it.
|
|
@ -1,8 +0,0 @@
|
|||
|
||||
* Activate access to **Technical Features** (debug mode).
|
||||
* Go to **Settings > Technical > Email > Subject Replacement Templates**
|
||||
* Create a new template.
|
||||
|
||||
* The field **Model** specifies the model to which the subject template should apply in the notification emails sent by Odoo.
|
||||
* The field **Subject Template** accepts `Jinja <https://jinja.palletsprojects.com/en/2.11.x/>`__ expressions.
|
||||
* The field **Replace** specifies if the template should replace existing content or append to it.
|
|
@ -0,0 +1,12 @@
|
|||
- Tecnativa \<<https://www.tecnativa.com>\>
|
||||
|
||||
> - Pedro M. Baeza
|
||||
> - João Marques
|
||||
> - Carlos Roca
|
||||
> - Víctor Martínez
|
||||
|
||||
- Versada \<<https://versada.eu>\>
|
||||
- Naglis Jonaitis
|
||||
|
||||
- Moduon \<<https://www.moduon.team>\>
|
||||
- Eduardo de Miguel
|
|
@ -1,12 +0,0 @@
|
|||
* Tecnativa <https://www.tecnativa.com>
|
||||
|
||||
* Pedro M. Baeza
|
||||
* João Marques
|
||||
* Carlos Roca
|
||||
* Víctor Martínez
|
||||
|
||||
* Versada <https://versada.eu>
|
||||
* Naglis Jonaitis
|
||||
|
||||
* Moduon <https://www.moduon.team>
|
||||
* Eduardo de Miguel
|
|
@ -1,2 +1,2 @@
|
|||
This module allows you to specify templates to override the subject on the notification
|
||||
emails sent by Odoo
|
||||
This module allows you to specify templates to override the subject on
|
||||
the notification emails sent by Odoo
|
|
@ -0,0 +1,5 @@
|
|||
To use this module, you need to:
|
||||
|
||||
- Open the chatter in Odoo (e.g. Open an Invoice).
|
||||
- Send a message.
|
||||
- Observe the rendered Subject template.
|
|
@ -1,5 +0,0 @@
|
|||
To use this module, you need to:
|
||||
|
||||
* Open the chatter in Odoo (e.g. Open an Invoice).
|
||||
* Send a message.
|
||||
* Observe the rendered Subject template.
|
|
@ -1,4 +1,3 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
|
@ -369,9 +368,9 @@ ul.auto-toc {
|
|||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:b873c6dfb9d094a1b5ebcd5c16a0c39a2127f4e7707aa54dd51dd4049f65d3fe
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/social/tree/15.0/mail_notification_custom_subject"><img alt="OCA/social" src="https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/social-15-0/social-15-0-mail_notification_custom_subject"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/social&target_branch=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module allows you to specify templates to override the subject on the notification
|
||||
emails sent by Odoo</p>
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/social/tree/17.0/mail_notification_custom_subject"><img alt="OCA/social" src="https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/social-17-0/social-17-0-mail_notification_custom_subject"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/social&target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module allows you to specify templates to override the subject on
|
||||
the notification emails sent by Odoo</p>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
<ul class="simple">
|
||||
|
@ -391,14 +390,19 @@ emails sent by Odoo</p>
|
|||
<ul>
|
||||
<li><p class="first">Activate access to <strong>Technical Features</strong> (debug mode).</p>
|
||||
</li>
|
||||
<li><p class="first">Go to <strong>Settings > Technical > Email > Subject Replacement Templates</strong></p>
|
||||
<li><p class="first">Go to <strong>Settings > Technical > Email > Subject Replacement
|
||||
Templates</strong></p>
|
||||
</li>
|
||||
<li><p class="first">Create a new template.</p>
|
||||
<blockquote>
|
||||
<ul class="simple">
|
||||
<li>The field <strong>Model</strong> specifies the model to which the subject template should apply in the notification emails sent by Odoo.</li>
|
||||
<li>The field <strong>Subject Template</strong> accepts <a class="reference external" href="https://jinja.palletsprojects.com/en/2.11.x/">Jinja</a> expressions.</li>
|
||||
<li>The field <strong>Replace</strong> specifies if the template should replace existing content or append to it.</li>
|
||||
<li>The field <strong>Model</strong> specifies the model to which the subject
|
||||
template should apply in the notification emails sent by Odoo.</li>
|
||||
<li>The field <strong>Subject Template</strong> accepts
|
||||
<a class="reference external" href="https://jinja.palletsprojects.com/en/2.11.x/">Jinja</a>
|
||||
expressions.</li>
|
||||
<li>The field <strong>Replace</strong> specifies if the template should replace
|
||||
existing content or append to it.</li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
|
@ -418,7 +422,7 @@ emails sent by Odoo</p>
|
|||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/social/issues">GitHub Issues</a>.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
||||
<a class="reference external" href="https://github.com/OCA/social/issues/new?body=module:%20mail_notification_custom_subject%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<a class="reference external" href="https://github.com/OCA/social/issues/new?body=module:%20mail_notification_custom_subject%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
|
@ -442,21 +446,15 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
<li><dl class="first docutils">
|
||||
<dt>Versada <<a class="reference external" href="https://versada.eu">https://versada.eu</a>></dt>
|
||||
<dd><ul class="first last simple">
|
||||
<li><p class="first">Versada <<a class="reference external" href="https://versada.eu">https://versada.eu</a>></p>
|
||||
<ul class="simple">
|
||||
<li>Naglis Jonaitis</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li><dl class="first docutils">
|
||||
<dt>Moduon <<a class="reference external" href="https://www.moduon.team">https://www.moduon.team</a>></dt>
|
||||
<dd><ul class="first last simple">
|
||||
<li><p class="first">Moduon <<a class="reference external" href="https://www.moduon.team">https://www.moduon.team</a>></p>
|
||||
<ul class="simple">
|
||||
<li>Eduardo de Miguel</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -469,7 +467,7 @@ mission is to support the collaborative development of Odoo features and
|
|||
promote its widespread use.</p>
|
||||
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
|
||||
<p><a class="reference external image-reference" href="https://github.com/yajo"><img alt="yajo" src="https://github.com/yajo.png?size=40px" /></a></p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/social/tree/15.0/mail_notification_custom_subject">OCA/social</a> project on GitHub.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/social/tree/17.0/mail_notification_custom_subject">OCA/social</a> project on GitHub.</p>
|
||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue