From 0ee730f1cbdd2b0a22805a0c6665d70dc2a55009 Mon Sep 17 00:00:00 2001 From: Sergio Morillo Date: Wed, 4 Nov 2020 15:00:06 +0100 Subject: [PATCH] Add email for no records template. This commit refs #15617 --- electronic_mail.py | 4 ++++ locale/es.po | 10 ++++++++++ view/electronic_mail_filter_form.xml | 2 ++ 3 files changed, 16 insertions(+) diff --git a/electronic_mail.py b/electronic_mail.py index 4c2d728..37bcff9 100644 --- a/electronic_mail.py +++ b/electronic_mail.py @@ -52,6 +52,10 @@ class ElectronicMailFilter(DeactivableMixin, ModelSQL, ModelView): }, help='Operator to mix the records obtained through the filters in the ' 'first tab and records calculated by the manual code.') + email = fields.Many2One('party.contact_mechanism', 'E-Mail', + domain=[('type', '=', 'email')], + help='Defines E-mail to use when email template has option ' + '"Send email when no records" enabled.') @classmethod def __setup__(cls): diff --git a/locale/es.po b/locale/es.po index b0b56a2..96b22dd 100644 --- a/locale/es.po +++ b/locale/es.po @@ -86,6 +86,16 @@ msgctxt "field:electronic.mail.filter,template:" msgid "eMail Template" msgstr "Plantilla de correo electrónico" +msgctxt "field:electronic.mail.filter,email:" +msgid "E-Mail" +msgstr "Correo electrónico" + +msgctxt "help:electronic.mail.filter,email:" +msgid "" +"Defines E-mail to use when email template has option \"Send email when no records\" enabled." +msgstr "" +"Indica el correo electrónico a usar cuando la plantilla de correo tiene marcada la opción \"Enviar correo si no hay resultados\"." + msgctxt "field:electronic.mail.filter,write_date:" msgid "Write Date" msgstr "Fecha modificación" diff --git a/view/electronic_mail_filter_form.xml b/view/electronic_mail_filter_form.xml index 9ad3bfd..b2107f2 100644 --- a/view/electronic_mail_filter_form.xml +++ b/view/electronic_mail_filter_form.xml @@ -13,6 +13,8 @@ copyright notices and license terms. -->