[MIG] mail_notification_custom_subject: Migration to v13.0
This commit is contained in:
parent
1bb5aee507
commit
7b747ffd95
@ -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<ttps://jinja.palletsprojects.com/en/2.11.x/>` expressions.
|
||||
* 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
|
||||
@ -60,7 +60,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 smashing it by providing a detailed and welcomed
|
||||
`feedback <https://github.com/OCA/social/issues/new?body=module:%20mail_notification_custom_subject%0Aversion:%2012.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:%2013.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.
|
||||
|
||||
@ -79,6 +79,7 @@ Contributors
|
||||
|
||||
* Pedro M. Baeza
|
||||
* João Marques
|
||||
* Carlos Roca
|
||||
|
||||
Maintainers
|
||||
~~~~~~~~~~~
|
||||
@ -101,6 +102,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|
||||
|
||||
|maintainer-joao-p-marques|
|
||||
|
||||
This module is part of the `OCA/social <https://github.com/OCA/social/tree/12.0/mail_notification_custom_subject>`_ project on GitHub.
|
||||
This module is part of the `OCA/social <https://github.com/OCA/social/tree/13.0/mail_notification_custom_subject>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
@ -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)",
|
||||
|
@ -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 <carlos.roca@tecnativa.com>\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"
|
||||
|
@ -4,9 +4,9 @@
|
||||
#
|
||||
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 ""
|
||||
|
||||
|
@ -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",
|
||||
|
@ -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<ttps://jinja.palletsprojects.com/en/2.11.x/>` expressions.
|
||||
* 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.
|
||||
|
@ -2,3 +2,4 @@
|
||||
|
||||
* Pedro M. Baeza
|
||||
* João Marques
|
||||
* Carlos Roca
|
||||
|
@ -367,7 +367,7 @@ ul.auto-toc {
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external" 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" 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" href="https://github.com/OCA/social/tree/12.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" href="https://translation.odoo-community.org/projects/social-12-0/social-12-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" href="https://runbot.odoo-community.org/runbot/205/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p><a class="reference external" 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" 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" href="https://github.com/OCA/social/tree/13.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" href="https://translation.odoo-community.org/projects/social-13-0/social-13-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" href="https://runbot.odoo-community.org/runbot/205/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-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>
|
||||
@ -395,7 +395,7 @@ emails sent by Odoo</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 <cite>Jinjah<ttps://jinja.palletsprojects.com/en/2.11.x/></cite> expressions.</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>
|
||||
@ -416,7 +416,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 smashing 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:%2012.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:%2013.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">
|
||||
@ -435,6 +435,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
||||
<ul class="simple">
|
||||
<li>Pedro M. Baeza</li>
|
||||
<li>João Marques</li>
|
||||
<li>Carlos Roca</li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
@ -449,7 +450,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" href="https://github.com/joao-p-marques"><img alt="joao-p-marques" src="https://github.com/joao-p-marques.png?size=40px" /></a></p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/social/tree/12.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/13.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>
|
||||
|
@ -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):
|
||||
|
@ -44,7 +44,6 @@
|
||||
>
|
||||
<field name="name">Subject Replacement Templates</field>
|
||||
<field name="res_model">mail.message.custom.subject</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form,tree</field>
|
||||
<field name="view_id" ref="mail_notification_custom_subject_tree" />
|
||||
</record>
|
||||
|
Loading…
Reference in New Issue
Block a user