Skip to content

Commit

Permalink
[MIG] mail_notification_custom_subject: Migration to 18.0
Browse files Browse the repository at this point in the history
TT54190
  • Loading branch information
victoralmau authored and pedrobaeza committed Feb 13, 2025
1 parent d022ae8 commit 1eafc9f
Show file tree
Hide file tree
Showing 10 changed files with 131 additions and 299 deletions.
20 changes: 10 additions & 10 deletions mail_notification_custom_subject/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ Mail Notification Custom Subject
.. |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-OCA%2Fsocial-lightgray.png?logo=github
:target: https://github.com/OCA/social/tree/17.0/mail_notification_custom_subject
:alt: OCA/social
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmail-lightgray.png?logo=github
:target: https://github.com/OCA/mail/tree/18.0/mail_notification_custom_subject
:alt: OCA/mail
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/social-17-0/social-17-0-mail_notification_custom_subject
:target: https://translation.odoo-community.org/projects/mail-18-0/mail-18-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=17.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/mail&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand All @@ -48,9 +48,9 @@ Configuration
- 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
`expressions <https://www.odoo.com/documentation/17.0/applications/general/companies/email_template.html#dynamic-placeholders>`__.
`expressions <https://www.odoo.com/documentation/18.0/applications/general/companies/email_template.html#dynamic-placeholders>`__.
- The field **Subject to replace** accepts
`expressions <https://www.odoo.com/documentation/17.0/applications/general/companies/email_template.html#dynamic-placeholders>`__
`expressions <https://www.odoo.com/documentation/18.0/applications/general/companies/email_template.html#dynamic-placeholders>`__
- The field **Replace** specifies if the template should replace
existing content or append to it.
- The field **Partial Replacement** specifies if the template
Expand All @@ -68,10 +68,10 @@ To use this module, you need to:
Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/social/issues>`_.
Bugs are tracked on `GitHub Issues <https://github.com/OCA/mail/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:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/mail/issues/new?body=module:%20mail_notification_custom_subject%0Aversion:%2018.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.

Expand Down Expand Up @@ -122,6 +122,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/17.0/mail_notification_custom_subject>`_ project on GitHub.
This module is part of the `OCA/mail <https://github.com/OCA/mail/tree/18.0/mail_notification_custom_subject>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 2 additions & 2 deletions mail_notification_custom_subject/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
{
"name": "Mail Notification Custom Subject",
"summary": "Apply a custom subject to mail notifications",
"version": "17.0.1.2.0",
"version": "18.0.1.0.0",
"category": "Social Network",
"website": "https://github.com/OCA/social",
"website": "https://github.com/OCA/mail",
"author": "Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
"installable": True,
Expand Down
10 changes: 0 additions & 10 deletions mail_notification_custom_subject/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,3 @@ msgid ""
"Whether to replace completely, partially, append at beginning or append at "
"end to other templates that apply to a given context"
msgstr ""

#~ msgid ""
#~ "Whether to replace, append at beggining or append at end to other "
#~ "templates that apply to a given context"
#~ msgstr ""
#~ "Si reemplazar, añadir al principio o añadir al final a otras plantillas "
#~ "que se aplican a un contexto determinado"

#~ msgid "Last Modified on"
#~ msgstr "Última Modificación el"
155 changes: 0 additions & 155 deletions mail_notification_custom_subject/i18n/es_ES.po

This file was deleted.

7 changes: 0 additions & 7 deletions mail_notification_custom_subject/i18n/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,3 @@ msgid ""
msgstr ""
"Se sostituire completamente, parzialmente, aggiungere all'inizio o alla fine "
"di altri modelli che si applicano a un dato contesto"

#~ msgid ""
#~ "Whether to replace, append at beggining or append at end to other "
#~ "templates that apply to a given context"
#~ msgstr ""
#~ "Se si applica ad un dato contesto la sostituzione, l'aggiunta all'inizio "
#~ "o l'aggiunta alla fine ad altri modelli"
13 changes: 9 additions & 4 deletions mail_notification_custom_subject/models/mail_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,15 @@ def message_post(
.sudo(False)
)
if not subject:
subject = "Re: %s" % self.env["mail.message"].with_context(
default_model=self._name,
default_res_id=self.id,
)._get_record_name({})
record_name = (
self.env["mail.message"]
.with_context(
default_model=self._name,
default_res_id=self.id,
)
._get_record_name({})
)
subject = f"Re: {record_name}"
for template in custom_subjects:
try:
rendered_subject_template = self.env[
Expand Down
4 changes: 2 additions & 2 deletions mail_notification_custom_subject/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
> - 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
> [expressions](https://www.odoo.com/documentation/17.0/applications/general/companies/email_template.html#dynamic-placeholders).
> [expressions](https://www.odoo.com/documentation/18.0/applications/general/companies/email_template.html#dynamic-placeholders).
> - The field **Subject to replace** accepts
> [expressions](https://www.odoo.com/documentation/17.0/applications/general/companies/email_template.html#dynamic-placeholders)
> [expressions](https://www.odoo.com/documentation/18.0/applications/general/companies/email_template.html#dynamic-placeholders)
> - The field **Replace** specifies if the template should replace
> existing content or append to it.
> - The field **Partial Replacement** specifies if the template should
Expand Down
12 changes: 6 additions & 6 deletions mail_notification_custom_subject/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ <h1 class="title">Mail Notification Custom Subject</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:83cd7d0e7b75b08fb47046bf6f644f1d4477aa51d8b6f2bf4cb042cd70e84a5e
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></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/mail/tree/18.0/mail_notification_custom_subject"><img alt="OCA/mail" src="https://img.shields.io/badge/github-OCA%2Fmail-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/mail-18-0/mail-18-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/mail&amp;target_branch=18.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>
Expand Down Expand Up @@ -399,9 +399,9 @@ <h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
<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://www.odoo.com/documentation/17.0/applications/general/companies/email_template.html#dynamic-placeholders">expressions</a>.</li>
<a class="reference external" href="https://www.odoo.com/documentation/18.0/applications/general/companies/email_template.html#dynamic-placeholders">expressions</a>.</li>
<li>The field <strong>Subject to replace</strong> accepts
<a class="reference external" href="https://www.odoo.com/documentation/17.0/applications/general/companies/email_template.html#dynamic-placeholders">expressions</a></li>
<a class="reference external" href="https://www.odoo.com/documentation/18.0/applications/general/companies/email_template.html#dynamic-placeholders">expressions</a></li>
<li>The field <strong>Replace</strong> specifies if the template should replace
existing content or append to it.</li>
<li>The field <strong>Partial Replacement</strong> specifies if the template
Expand All @@ -422,10 +422,10 @@ <h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/social/issues">GitHub Issues</a>.
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/mail/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:%2017.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/mail/issues/new?body=module:%20mail_notification_custom_subject%0Aversion:%2018.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">
Expand Down Expand Up @@ -472,7 +472,7 @@ <h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
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/17.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/mail/tree/18.0/mail_notification_custom_subject">OCA/mail</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>
Expand Down
Loading

0 comments on commit 1eafc9f

Please sign in to comment.