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

[15.0][MIG] mail_notification_custom_subject: Migration to 15.0 #982

Merged
Merged
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
4 changes: 2 additions & 2 deletions mail_debrand/models/mail_render_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def _render_template(
template_src,
model,
res_ids,
engine="qweb_view",
engine="inline_template",
add_context=None,
options=None,
post_process=False,
Expand All @@ -71,7 +71,7 @@ def _render_template(
this could be cleaned but hey, we are in a rush
:param str model: model name of records on which we want to perform rendering
:param list res_ids: list of ids of records (all belonging to same model)
:param string engine: jinja
:param string engine: inline_template, qweb or qweb_view;
:param post_process: perform rendered str / html post processing (see
``_render_template_postprocess``)

Expand Down
110 changes: 110 additions & 0 deletions mail_notification_custom_subject/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
================================
Mail Notification Custom Subject
================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
:target: https://odoo-community.org/page/development-status
:alt: Production/Stable
.. |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/15.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
: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/15.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows you to specify templates to override the subject on the notification
emails sent by Odoo

**Table of contents**

.. contents::
:local:

Configuration
=============


* 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.

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.

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:%2015.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
~~~~~~~

* Tecnativa

Contributors
~~~~~~~~~~~~

* Tecnativa <https://www.tecnativa.com>

* Pedro M. Baeza
* João Marques
* Carlos Roca

* Versada <https://versada.eu>
* Naglis Jonaitis

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-joao-p-marques| image:: https://github.com/joao-p-marques.png?size=40px
:target: https://github.com/joao-p-marques
:alt: joao-p-marques

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/15.0/mail_notification_custom_subject>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions mail_notification_custom_subject/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
21 changes: 21 additions & 0 deletions mail_notification_custom_subject/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2020-2021 Tecnativa - João Marques
# Copyright 2021 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"name": "Mail Notification Custom Subject",
"summary": "Apply a custom subject to mail notifications",
"version": "15.0.1.0.0",
"category": "Social Network",
"website": "https://github.com/OCA/social",
"author": "Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
"installable": True,
"depends": ["mail"],
"data": [
"security/ir.model.access.csv",
"views/mail_notification_custom_subject_views.xml",
],
"development_status": "Production/Stable",
"maintainers": ["joao-p-marques"],
}
137 changes: 137 additions & 0 deletions mail_notification_custom_subject/i18n/es_ES.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mail_notification_custom_subject
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \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.0.6\n"

#. module: mail_notification_custom_subject
#: 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
#: 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
#: 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
msgid "Mail Message Custom Subject"
msgstr "Asunto Personalizado en Mensaje de Correo"

#. module: mail_notification_custom_subject
#: 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)"

#. module: mail_notification_custom_subject
#: model:ir.actions.act_window,name:mail_notification_custom_subject.action_mail_notification_custom_subject_tree_all
#: model:ir.ui.menu,name:mail_notification_custom_subject.menu_mail_notification_custom_subject
#: model_terms:ir.ui.view,arch_db:mail_notification_custom_subject.mail_notification_custom_subject_form
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"
Loading