From 7b747ffd954e746d505dac0ca920f982bdafd29f Mon Sep 17 00:00:00 2001
From: Carlos Roca
Date: Tue, 16 Feb 2021 08:54:52 +0100
Subject: [PATCH] [MIG] mail_notification_custom_subject: Migration to v13.0
---
mail_notification_custom_subject/README.rst | 13 +--
.../__manifest__.py | 2 +-
.../i18n/es_ES.po | 98 ++++++++++++++++---
.../i18n/mail_notification_custom_subject.pot | 23 ++---
.../models/mail_message_custom_subject.py | 8 +-
.../readme/CONFIGURE.rst | 2 +-
.../readme/CONTRIBUTORS.rst | 1 +
.../static/description/index.html | 9 +-
.../test_mail_notification_custom_subject.py | 14 +--
...mail_notification_custom_subject_views.xml | 1 -
10 files changed, 114 insertions(+), 57 deletions(-)
diff --git a/mail_notification_custom_subject/README.rst b/mail_notification_custom_subject/README.rst
index 4aa642643..b6a9ecbe7 100644
--- a/mail_notification_custom_subject/README.rst
+++ b/mail_notification_custom_subject/README.rst
@@ -14,13 +14,13 @@ 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/12.0/mail_notification_custom_subject
+ :target: https://github.com/OCA/social/tree/13.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-12-0/social-12-0-mail_notification_custom_subject
+ :target: https://translation.odoo-community.org/projects/social-13-0/social-13-0-mail_notification_custom_subject
: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/12.0
+ :target: https://runbot.odoo-community.org/runbot/205/13.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -42,7 +42,7 @@ Configuration
* 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 `Jinjah` expressions.
+ * The field **Subject Template** accepts `Jinja `__ expressions.
* The field **Replace** specifies if the template should replace existing content or append to it.
Usage
@@ -60,7 +60,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.
@@ -79,6 +79,7 @@ Contributors
* Pedro M. Baeza
* João Marques
+ * Carlos Roca
Maintainers
~~~~~~~~~~~
@@ -101,6 +102,6 @@ Current `maintainer `__:
|maintainer-joao-p-marques|
-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_notification_custom_subject/__manifest__.py b/mail_notification_custom_subject/__manifest__.py
index 7302252f4..10429becc 100644
--- a/mail_notification_custom_subject/__manifest__.py
+++ b/mail_notification_custom_subject/__manifest__.py
@@ -5,7 +5,7 @@
{
"name": "Mail Notification Custom Subject",
"summary": "Apply a custom subject to mail notifications",
- "version": "12.0.1.0.0",
+ "version": "13.0.1.0.0",
"category": "Social Network",
"website": "https://github.com/OCA/social",
"author": "Tecnativa, Odoo Community Association (OCA)",
diff --git a/mail_notification_custom_subject/i18n/es_ES.po b/mail_notification_custom_subject/i18n/es_ES.po
index a1147e83c..0f19a648f 100644
--- a/mail_notification_custom_subject/i18n/es_ES.po
+++ b/mail_notification_custom_subject/i18n/es_ES.po
@@ -6,39 +6,71 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-01-05 09:11+0000\n"
-"PO-Revision-Date: 2021-01-05 09:17+0000\n"
+"POT-Creation-Date: 2021-02-16 10:56+0000\n"
+"PO-Revision-Date: 2021-02-16 11:56+0100\n"
+"Last-Translator: Carlos \n"
"Language-Team: \n"
+"Language: es_ES\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Poedit 2.4.2\n"
-"Last-Translator: \n"
-"Language: es_ES\n"
+"X-Generator: Poedit 2.0.6\n"
#. module: mail_notification_custom_subject
-#: code:addons/mail_notification_custom_subject/models/mail_message_custom_subject.py:150
-#, python-format
+#: model:ir.model.fields.selection,name:mail_notification_custom_subject.selection__mail_message_custom_subject__position__append_after
msgid "Append After"
msgstr "Añadir después"
#. module: mail_notification_custom_subject
-#: code:addons/mail_notification_custom_subject/models/mail_message_custom_subject.py:149
-#, python-format
+#: model:ir.model.fields.selection,name:mail_notification_custom_subject.selection__mail_message_custom_subject__position__append_before
msgid "Append Before"
msgstr "Añadir antes"
+#. module: mail_notification_custom_subject
+#: model:ir.model.fields,field_description:mail_notification_custom_subject.field_mail_message_custom_subject__subtype_ids
+msgid "Applied Subtypes"
+msgstr "Subtipos aplicados"
+
+#. module: mail_notification_custom_subject
+#: model:ir.model.fields,field_description:mail_notification_custom_subject.field_mail_message_custom_subject__create_uid
+msgid "Created by"
+msgstr "Creado por"
+
+#. module: mail_notification_custom_subject
+#: model:ir.model.fields,field_description:mail_notification_custom_subject.field_mail_message_custom_subject__create_date
+msgid "Created on"
+msgstr "Creado el"
+
+#. module: mail_notification_custom_subject
+#: model:ir.model.fields,field_description:mail_notification_custom_subject.field_mail_message_custom_subject__display_name
+msgid "Display Name"
+msgstr "Nombre mostrado"
+
#. module: mail_notification_custom_subject
#: model:ir.model,name:mail_notification_custom_subject.model_mail_thread
msgid "Email Thread"
msgstr "Hilo de correo electrónico"
#. module: mail_notification_custom_subject
-#: code:addons/mail_notification_custom_subject/models/mail_message_custom_subject.py:238
-#, python-format
-msgid "Failed to render template %r using values %r"
-msgstr "Error al procesar la plantilla %r usando los valores %r"
+#: model:ir.model.fields,field_description:mail_notification_custom_subject.field_mail_message_custom_subject__id
+msgid "ID"
+msgstr "ID"
+
+#. module: mail_notification_custom_subject
+#: model:ir.model.fields,field_description:mail_notification_custom_subject.field_mail_message_custom_subject____last_update
+msgid "Last Modified on"
+msgstr "Última modificación el"
+
+#. module: mail_notification_custom_subject
+#: model:ir.model.fields,field_description:mail_notification_custom_subject.field_mail_message_custom_subject__write_uid
+msgid "Last Updated by"
+msgstr "Última modificación por"
+
+#. module: mail_notification_custom_subject
+#: model:ir.model.fields,field_description:mail_notification_custom_subject.field_mail_message_custom_subject__write_date
+msgid "Last Updated on"
+msgstr "Última actualización el"
#. module: mail_notification_custom_subject
#: model:ir.model,name:mail_notification_custom_subject.model_mail_message_custom_subject
@@ -46,12 +78,27 @@ msgid "Mail Message Custom Subject"
msgstr "Asunto Personalizado en Mensaje de Correo"
#. module: mail_notification_custom_subject
-#: code:addons/mail_notification_custom_subject/models/mail_message_custom_subject.py:151
-#, python-format
+#: model:ir.model.fields,field_description:mail_notification_custom_subject.field_mail_message_custom_subject__model_id
+msgid "Model"
+msgstr "Modelo"
+
+#. module: mail_notification_custom_subject
+#: model:ir.model.fields,help:mail_notification_custom_subject.field_mail_message_custom_subject__model_id
+msgid "Model where this template applies"
+msgstr "Modelo en el que se aplica la plantilla"
+
+#. module: mail_notification_custom_subject
+#: model:ir.model.fields,field_description:mail_notification_custom_subject.field_mail_message_custom_subject__position
+msgid "Position"
+msgstr "Posición"
+
+#. module: mail_notification_custom_subject
+#: model:ir.model.fields.selection,name:mail_notification_custom_subject.selection__mail_message_custom_subject__position__replace
msgid "Replace"
msgstr "Sustituir"
#. module: mail_notification_custom_subject
+#: model:ir.model.fields,help:mail_notification_custom_subject.field_mail_message_custom_subject__subject_template
#: model_terms:ir.ui.view,arch_db:mail_notification_custom_subject.mail_notification_custom_subject_form
msgid "Subject (placeholders may be used here)"
msgstr "Asunto (se pueden utilizar aquí expresiones de campos)"
@@ -63,7 +110,28 @@ msgstr "Asunto (se pueden utilizar aquí expresiones de campos)"
msgid "Subject Replacement Templates"
msgstr "Plantillas de Sustitución de Asuntos"
+#. module: mail_notification_custom_subject
+#: model:ir.model.fields,field_description:mail_notification_custom_subject.field_mail_message_custom_subject__subject_template
+#, fuzzy
+msgid "Subject Template"
+msgstr "Plantillas de Sustitución de Asuntos"
+
+#. module: mail_notification_custom_subject
+#: model:ir.model.fields,field_description:mail_notification_custom_subject.field_mail_message_custom_subject__name
+#, fuzzy
+msgid "Template Name"
+msgstr "Plantillas"
+
#. module: mail_notification_custom_subject
#: model_terms:ir.ui.view,arch_db:mail_notification_custom_subject.mail_notification_custom_subject_tree
msgid "Templates"
msgstr "Plantillas"
+
+#. module: mail_notification_custom_subject
+#: model:ir.model.fields,help:mail_notification_custom_subject.field_mail_message_custom_subject__position
+msgid ""
+"Whether to replace, append at beggining or append at end to other templates "
+"that apply to a given context"
+msgstr ""
+"Ya sea para reemplazar, agregar al principio o agregar al final a otras "
+"plantillas que se aplican a un contexto determinado"
diff --git a/mail_notification_custom_subject/i18n/mail_notification_custom_subject.pot b/mail_notification_custom_subject/i18n/mail_notification_custom_subject.pot
index 5b48b0882..ff5b60ad3 100644
--- a/mail_notification_custom_subject/i18n/mail_notification_custom_subject.pot
+++ b/mail_notification_custom_subject/i18n/mail_notification_custom_subject.pot
@@ -1,12 +1,12 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
-# * mail_notification_custom_subject
+# * mail_notification_custom_subject
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 12.0\n"
+"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
-"Last-Translator: <>\n"
+"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -14,16 +14,12 @@ msgstr ""
"Plural-Forms: \n"
#. module: mail_notification_custom_subject
-#: code:addons/mail_notification_custom_subject/models/mail_message_custom_subject.py:31
-#: selection:mail.message.custom.subject,position:0
-#, python-format
+#: model:ir.model.fields.selection,name:mail_notification_custom_subject.selection__mail_message_custom_subject__position__append_after
msgid "Append After"
msgstr ""
#. module: mail_notification_custom_subject
-#: code:addons/mail_notification_custom_subject/models/mail_message_custom_subject.py:30
-#: selection:mail.message.custom.subject,position:0
-#, python-format
+#: model:ir.model.fields.selection,name:mail_notification_custom_subject.selection__mail_message_custom_subject__position__append_before
msgid "Append Before"
msgstr ""
@@ -93,9 +89,7 @@ msgid "Position"
msgstr ""
#. module: mail_notification_custom_subject
-#: code:addons/mail_notification_custom_subject/models/mail_message_custom_subject.py:32
-#: selection:mail.message.custom.subject,position:0
-#, python-format
+#: model:ir.model.fields.selection,name:mail_notification_custom_subject.selection__mail_message_custom_subject__position__replace
msgid "Replace"
msgstr ""
@@ -129,6 +123,7 @@ msgstr ""
#. module: mail_notification_custom_subject
#: model:ir.model.fields,help:mail_notification_custom_subject.field_mail_message_custom_subject__position
-msgid "Whether to replace, append at beggining or append at end to other templates that apply to a given context"
+msgid ""
+"Whether to replace, append at beggining or append at end to other templates "
+"that apply to a given context"
msgstr ""
-
diff --git a/mail_notification_custom_subject/models/mail_message_custom_subject.py b/mail_notification_custom_subject/models/mail_message_custom_subject.py
index 60a713a54..5aaeeccc1 100644
--- a/mail_notification_custom_subject/models/mail_message_custom_subject.py
+++ b/mail_notification_custom_subject/models/mail_message_custom_subject.py
@@ -1,7 +1,7 @@
# Copyright 2020 Tecnativa - João Marques
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-from odoo import _, fields, models
+from odoo import fields, models
class MailMessageCustomSubject(models.Model):
@@ -25,9 +25,9 @@ class MailMessageCustomSubject(models.Model):
)
position = fields.Selection(
selection=[
- ("append_before", _("Append Before")),
- ("append_after", _("Append After")),
- ("replace", _("Replace")),
+ ("append_before", "Append Before"),
+ ("append_after", "Append After"),
+ ("replace", "Replace"),
],
string="Position",
default="replace",
diff --git a/mail_notification_custom_subject/readme/CONFIGURE.rst b/mail_notification_custom_subject/readme/CONFIGURE.rst
index 86bed07b4..c777ed3ae 100644
--- a/mail_notification_custom_subject/readme/CONFIGURE.rst
+++ b/mail_notification_custom_subject/readme/CONFIGURE.rst
@@ -4,5 +4,5 @@
* 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 `Jinjah` expressions.
+ * The field **Subject Template** accepts `Jinja `__ expressions.
* The field **Replace** specifies if the template should replace existing content or append to it.
diff --git a/mail_notification_custom_subject/readme/CONTRIBUTORS.rst b/mail_notification_custom_subject/readme/CONTRIBUTORS.rst
index b0f16877f..e7d295ba9 100644
--- a/mail_notification_custom_subject/readme/CONTRIBUTORS.rst
+++ b/mail_notification_custom_subject/readme/CONTRIBUTORS.rst
@@ -2,3 +2,4 @@
* Pedro M. Baeza
* João Marques
+ * Carlos Roca
diff --git a/mail_notification_custom_subject/static/description/index.html b/mail_notification_custom_subject/static/description/index.html
index 21bf700d9..49265e85b 100644
--- a/mail_notification_custom_subject/static/description/index.html
+++ b/mail_notification_custom_subject/static/description/index.html
@@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-

+

This module allows you to specify templates to override the subject on the notification
emails sent by Odoo
Table of contents
@@ -395,7 +395,7 @@ emails sent by Odoo
- 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 Jinjah<ttps://jinja.palletsprojects.com/en/2.11.x/> expressions.
+- The field Subject Template accepts Jinja expressions.
- The field Replace specifies if the template should replace existing content or append to it.
@@ -416,7 +416,7 @@ emails sent by Odoo
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.
@@ -435,6 +435,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
- Pedro M. Baeza
- João Marques
+- Carlos Roca
@@ -449,7 +450,7 @@ mission is to support the collaborative development of Odoo features and
promote its widespread use.
Current maintainer:

-
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_notification_custom_subject/tests/test_mail_notification_custom_subject.py b/mail_notification_custom_subject/tests/test_mail_notification_custom_subject.py
index dfd672e31..e9a89967d 100644
--- a/mail_notification_custom_subject/tests/test_mail_notification_custom_subject.py
+++ b/mail_notification_custom_subject/tests/test_mail_notification_custom_subject.py
@@ -6,20 +6,12 @@ from odoo.tests import common
class TestMailNotificationCustomSubject(common.TransactionCase):
def setUp(self):
- super(TestMailNotificationCustomSubject, self).setUp()
+ super().setUp()
self.partner_1 = self.env["res.partner"].create(
- {
- "name": "Test partner 1",
- "supplier": True,
- "email": "partner1@example.com",
- }
+ {"name": "Test partner 1", "email": "partner1@example.com"}
)
self.partner_2 = self.env["res.partner"].create(
- {
- "name": "Test partner 2",
- "supplier": True,
- "email": "partner2@example.com",
- }
+ {"name": "Test partner 2", "email": "partner2@example.com"}
)
def test_email_subject_template_overrides(self):
diff --git a/mail_notification_custom_subject/views/mail_notification_custom_subject_views.xml b/mail_notification_custom_subject/views/mail_notification_custom_subject_views.xml
index e2b333002..14ecd80d6 100644
--- a/mail_notification_custom_subject/views/mail_notification_custom_subject_views.xml
+++ b/mail_notification_custom_subject/views/mail_notification_custom_subject_views.xml
@@ -44,7 +44,6 @@
>
Subject Replacement Templates
mail.message.custom.subject
- form
form,tree