Browse Source
Merge pull request #902 from Eficent/10.0-mig-fetchmail_notify_error_to_sender
Merge pull request #902 from Eficent/10.0-mig-fetchmail_notify_error_to_sender
[10.0][MIG] fetchmail_notify_error_to_senderpull/956/head
Jordi Ballester Alomar
7 years ago
committed by
GitHub
21 changed files with 764 additions and 201 deletions
-
53fetchmail_notify_error_to_sender/README.rst
-
24fetchmail_notify_error_to_sender/__init__.py
-
37fetchmail_notify_error_to_sender/__manifest__.py
-
9fetchmail_notify_error_to_sender/data/email_template_data.xml
-
30fetchmail_notify_error_to_sender/fetchmail.py
-
61fetchmail_notify_error_to_sender/i18n/ca.po
-
73fetchmail_notify_error_to_sender/i18n/de.po
-
90fetchmail_notify_error_to_sender/i18n/es.po
-
73fetchmail_notify_error_to_sender/i18n/fr.po
-
61fetchmail_notify_error_to_sender/i18n/hr.po
-
61fetchmail_notify_error_to_sender/i18n/it.po
-
24fetchmail_notify_error_to_sender/i18n/pt_BR.po
-
60fetchmail_notify_error_to_sender/i18n/pt_PT.po
-
36fetchmail_notify_error_to_sender/i18n/sl.po
-
73fetchmail_notify_error_to_sender/i18n/tr.po
-
61fetchmail_notify_error_to_sender/i18n/zh_CN.po
-
75fetchmail_notify_error_to_sender/mail_thread.py
-
6fetchmail_notify_error_to_sender/models/__init__.py
-
15fetchmail_notify_error_to_sender/models/fetchmail.py
-
32fetchmail_notify_error_to_sender/models/mail_thread.py
-
11fetchmail_notify_error_to_sender/views/fetchmail_view.xml
@ -1,22 +1,6 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Copyright (C) 2015 Lorenzo Battistini <lorenzo.battistini@agilebg.com> |
|||
# |
|||
# This program is free software: you can redistribute it and/or modify |
|||
# it under the terms of the GNU Affero General Public License as published |
|||
# by the Free Software Foundation, either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU Affero General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Affero General Public License |
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
# Copyright 2015 Lorenzo Battistini <lorenzo.battistini@agilebg.com> |
|||
# Copyright 2017 Eficent <http://www.eficent.com> |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|||
|
|||
from . import mail_thread |
|||
from . import fetchmail |
|||
from . import models |
@ -1,40 +1,25 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Copyright (C) 2015 Lorenzo Battistini <lorenzo.battistini@agilebg.com> |
|||
# |
|||
# This program is free software: you can redistribute it and/or modify |
|||
# it under the terms of the GNU Affero General Public License as published |
|||
# by the Free Software Foundation, either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU Affero General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Affero General Public License |
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
# Copyright 2015 Lorenzo Battistini <lorenzo.battistini@agilebg.com> |
|||
# Copyright 2017 Eficent <http://www.eficent.com> |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|||
|
|||
{ |
|||
'name': 'Send notice on fetchmail errors', |
|||
'name': 'Fetchmail Notify Error to Sender', |
|||
'summary': 'If fetching mails gives error, send an email to sender', |
|||
'version': '8.0.1.0.0', |
|||
'version': '10.0.1.0.0', |
|||
'category': 'Tools', |
|||
'author': "Agile Business Group,Odoo Community Association (OCA)", |
|||
'website': 'http://www.agilebg.com', |
|||
'author': "Agile Business Group,Eficent,Odoo Community Association (OCA)", |
|||
'website': 'https://github.com/OCA/server-tools', |
|||
'license': 'AGPL-3', |
|||
'depends': [ |
|||
'fetchmail', |
|||
], |
|||
'data': [ |
|||
'fetchmail_view.xml', |
|||
'email_template_data.xml', |
|||
'views/fetchmail_view.xml', |
|||
'data/email_template_data.xml', |
|||
], |
|||
'qweb': [ |
|||
], |
|||
'installable': False, |
|||
'auto_install': False, |
|||
'installable': True, |
|||
'application': False, |
|||
} |
@ -1,30 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Copyright (C) 2015 Lorenzo Battistini <lorenzo.battistini@agilebg.com> |
|||
# |
|||
# This program is free software: you can redistribute it and/or modify |
|||
# it under the terms of the GNU Affero General Public License as published |
|||
# by the Free Software Foundation, either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU Affero General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Affero General Public License |
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
|
|||
from openerp import models, fields |
|||
|
|||
|
|||
class fetchmail_server(models.Model): |
|||
|
|||
_inherit = 'fetchmail.server' |
|||
error_notice_template_id = fields.Many2one( |
|||
'email.template', string="Error notice template", |
|||
help="Set here the template to use to send notice to sender when " |
|||
"errors occur while fetching email") |
@ -0,0 +1,61 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * fetchmail_notify_error_to_sender |
|||
# |
|||
# Translators: |
|||
# Marc Tormo i Bochaca <mtbochaca@gmail.com>, 2017 |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 9.0c\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2017-07-15 02:48+0000\n" |
|||
"PO-Revision-Date: 2017-07-15 02:48+0000\n" |
|||
"Last-Translator: Marc Tormo i Bochaca <mtbochaca@gmail.com>, 2017\n" |
|||
"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Language: ca\n" |
|||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:mail.template,body_html:fetchmail_notify_error_to_sender.email_template_error_notice |
|||
msgid "" |
|||
"\n" |
|||
"<div>\n" |
|||
" <p>Hello ${ctx.get('sender_message').get('from')},</p>\n" |
|||
" <p>we got a problem with your email: <i>${ctx.get('sender_message').get('subject')}</i></p>\n" |
|||
" <p>Maybe you used a wrong recipient address?</p>\n" |
|||
" <p><br/></p>\n" |
|||
" <p>Technical details:</p>\n" |
|||
" <p><i>${ctx.get('route_exception').message}</i></p>\n" |
|||
"</div>\n" |
|||
" " |
|||
msgstr "" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model,name:fetchmail_notify_error_to_sender.model_mail_thread |
|||
msgid "Email Thread" |
|||
msgstr "Tema del Correu electrònic " |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model.fields,field_description:fetchmail_notify_error_to_sender.field_fetchmail_server_error_notice_template_id |
|||
msgid "Error notice template" |
|||
msgstr "" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model,name:fetchmail_notify_error_to_sender.model_fetchmail_server |
|||
msgid "POP/IMAP Server" |
|||
msgstr "Servidor POP/IMAP" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:mail.template,subject:fetchmail_notify_error_to_sender.email_template_error_notice |
|||
msgid "Receiving error with: ${ctx.get('sender_message').get('subject')|safe}" |
|||
msgstr "" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model.fields,help:fetchmail_notify_error_to_sender.field_fetchmail_server_error_notice_template_id |
|||
msgid "" |
|||
"Set here the template to use to send notice to sender when errors occur " |
|||
"while fetching email" |
|||
msgstr "" |
@ -0,0 +1,73 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * fetchmail_notify_error_to_sender |
|||
# |
|||
# Translators: |
|||
# OCA Transbot <transbot@odoo-community.org>, 2017 |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 9.0c\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2017-07-15 02:48+0000\n" |
|||
"PO-Revision-Date: 2017-07-15 02:48+0000\n" |
|||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n" |
|||
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Language: de\n" |
|||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:mail.template,body_html:fetchmail_notify_error_to_sender.email_template_error_notice |
|||
msgid "" |
|||
"\n" |
|||
"<div>\n" |
|||
" <p>Hello ${ctx.get('sender_message').get('from')},</p>\n" |
|||
" <p>we got a problem with your email: <i>${ctx.get('sender_message').get('subject')}</i></p>\n" |
|||
" <p>Maybe you used a wrong recipient address?</p>\n" |
|||
" <p><br/></p>\n" |
|||
" <p>Technical details:</p>\n" |
|||
" <p><i>${ctx.get('route_exception').message}</i></p>\n" |
|||
"</div>\n" |
|||
" " |
|||
msgstr "" |
|||
"\n" |
|||
"<div>\n" |
|||
" <p>Hallo ${ctx.get('sender_message').get('from')},</p>\n" |
|||
" <p>wir haben ein Problem mit Ihrer Email: <i>${ctx.get('sender_message').get('subject')}</i></p>\n" |
|||
" <p>Vielleicht haben Sie nur die falsche Empfängeradresse angegeben?</p>\n" |
|||
" <p><br/></p>\n" |
|||
" <p>Technische Details:</p>\n" |
|||
" <p><i>${ctx.get('route_exception').message}</i></p>\n" |
|||
"</div>\n" |
|||
" " |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model,name:fetchmail_notify_error_to_sender.model_mail_thread |
|||
msgid "Email Thread" |
|||
msgstr "Email-Thread" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model.fields,field_description:fetchmail_notify_error_to_sender.field_fetchmail_server_error_notice_template_id |
|||
msgid "Error notice template" |
|||
msgstr "Fehlerhinweis-Vorlage" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model,name:fetchmail_notify_error_to_sender.model_fetchmail_server |
|||
msgid "POP/IMAP Server" |
|||
msgstr "POP/IMAP Server" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:mail.template,subject:fetchmail_notify_error_to_sender.email_template_error_notice |
|||
msgid "Receiving error with: ${ctx.get('sender_message').get('subject')|safe}" |
|||
msgstr "Erhalte Fehler mit: ${ctx.get('sender_message').get('subject')|safe}" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model.fields,help:fetchmail_notify_error_to_sender.field_fetchmail_server_error_notice_template_id |
|||
msgid "" |
|||
"Set here the template to use to send notice to sender when errors occur " |
|||
"while fetching email" |
|||
msgstr "" |
|||
"Legen Sie hier die Vorlage fest, die verwendet werden soll, um Hinweise an " |
|||
"Benutzer zu senden, wenn Fehler beim Nachrichten Abholen auftreten." |
@ -0,0 +1,90 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * fetchmail_notify_error_to_sender |
|||
# |
|||
# Translators: |
|||
# Ahmet Altınışık <aaltinisik@altinkaya.com.tr>, 2016 |
|||
# Antonio Trueba, 2016 |
|||
# Antonio Trueba, 2016 |
|||
# bossnm11 <bossnm11@gmail.com>, 2014 |
|||
# Carles Antoli <carlesantoli@hotmail.com>, 2015 |
|||
# Chanseok <kcsgoodboy@gmail.com>, 2014 |
|||
# Chul Park <parkchul@nate.com>, 2015 |
|||
# David10000 <gameness@naver.com>, 2014 |
|||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012-2013 |
|||
# Gil <gedwarp@gmail.com>, 2014 |
|||
# Hongseob Lee <shevious@gmail.com>, 2015 |
|||
# Hongseob Lee <shevreg@yahoo.com>, 2015 |
|||
# Hotellook, 2014 |
|||
# jeon <bluerespect@nate.com>, 2014 |
|||
# JiyeonLee <leejiyeon00@gmail.com>, 2014 |
|||
# Jong-Dae Park <jdpark7@gmail.com>, 2013 |
|||
# Kevin Min <gr326887@graded.br>, 2015 |
|||
# KimKyudong <choemh@nate.com>, 2014 |
|||
# mariana1201 <gogo3135@naver.com>, 2014 |
|||
# Matjaž Mozetič <m.mozetic@matmoz.si>, 2015-2016 |
|||
# Nicole <dlruddk1112@gmail.com>, 2014 |
|||
# Paolo Valier, 2016 |
|||
# Pope, 2014 |
|||
# Rudolf Schnapka <rs@techno-flex.de>, 2016 |
|||
# Sarina Canelake <sarina@edx.org>, 2014 |
|||
# Seok Jun Yoon <fake2real@dctribe.com>, 2015 |
|||
# shin2012 <shin2013@gmail.com>, 2014 |
|||
# Sujin Lee <sujinlee.me@gmail.com>, 2014 |
|||
# Sunah Lim <whitetree70@snu.ac.kr>, 2013 |
|||
# Young Kim <youngck.uw@gmail.com>, 2015 |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: server-tools (8.0)\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2016-04-14 07:02+0000\n" |
|||
"PO-Revision-Date: 2016-04-07 17:54+0000\n" |
|||
"Last-Translator: Antonio Trueba\n" |
|||
"Language-Team: Spanish (http://www.transifex.com/oca/OCA-server-tools-8-0/language/es/)\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Language: es\n" |
|||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:mail.template,body_html:fetchmail_notify_error_to_sender.email_template_error_notice |
|||
msgid "" |
|||
"\n" |
|||
"<div>\n" |
|||
" <p>Hello ${ctx.get('sender_message').get('from')},</p>\n" |
|||
" <p>we got a problem with your email: <i>${ctx.get('sender_message').get('subject')}</i></p>\n" |
|||
" <p>Maybe you used a wrong recipient address?</p>\n" |
|||
" <p><br/></p>\n" |
|||
" <p>Technical details:</p>\n" |
|||
" <p><i>${ctx.get('route_exception').message}</i></p>\n" |
|||
"</div>\n" |
|||
" " |
|||
msgstr "\n<div>\n <p>Hola ${ctx.get('sender_message').get('from')},</p>\n <p>tenemos un problema con su email: <i>${ctx.get('sender_message').get('subject')}</i></p>\n <p>¿Puede haber usado una dirección de destino incorrecta?</p>\n <p><br/></p>\n <p>Detalles técnicos:</p>\n <p><i>${ctx.get('route_exception').message}</i></p>\n</div>\n " |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model,name:fetchmail_notify_error_to_sender.model_mail_thread |
|||
msgid "Email Thread" |
|||
msgstr "Hilo correo electrónico" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: field:fetchmail.server,error_notice_template_id:0 |
|||
msgid "Error notice template" |
|||
msgstr "" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model,name:fetchmail_notify_error_to_sender.model_fetchmail_server |
|||
msgid "POP/IMAP Server" |
|||
msgstr "Servidor POP/IMAP" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:mail.template,subject:fetchmail_notify_error_to_sender.email_template_error_notice |
|||
msgid "Receiving error with: ${ctx.get('sender_message').get('subject')|safe}" |
|||
msgstr "" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: help:fetchmail.server,error_notice_template_id:0 |
|||
msgid "" |
|||
"Set here the template to use to send notice to sender when errors occur " |
|||
"while fetching email" |
|||
msgstr "" |
@ -0,0 +1,73 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * fetchmail_notify_error_to_sender |
|||
# |
|||
# Translators: |
|||
# OCA Transbot <transbot@odoo-community.org>, 2017 |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 9.0c\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2017-07-15 02:48+0000\n" |
|||
"PO-Revision-Date: 2017-07-15 02:48+0000\n" |
|||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n" |
|||
"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Language: fr\n" |
|||
"Plural-Forms: nplurals=2; plural=(n > 1);\n" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:mail.template,body_html:fetchmail_notify_error_to_sender.email_template_error_notice |
|||
msgid "" |
|||
"\n" |
|||
"<div>\n" |
|||
" <p>Hello ${ctx.get('sender_message').get('from')},</p>\n" |
|||
" <p>we got a problem with your email: <i>${ctx.get('sender_message').get('subject')}</i></p>\n" |
|||
" <p>Maybe you used a wrong recipient address?</p>\n" |
|||
" <p><br/></p>\n" |
|||
" <p>Technical details:</p>\n" |
|||
" <p><i>${ctx.get('route_exception').message}</i></p>\n" |
|||
"</div>\n" |
|||
" " |
|||
msgstr "" |
|||
"\n" |
|||
"<div>\n" |
|||
"<p>Bonjour ${ctx.get('sender_message').get('from')},</p>\n" |
|||
"<p>nous avons de la difficulté avec votre adresse de courriel: <i>${ctx.get('sender_message').get('subject')}</i></p>\n" |
|||
"<p>Peut-être avez-vous utilisé une mauvaise adresse de destinataire?</p>\n" |
|||
"<p><br/></p>\n" |
|||
"<p>Détails techniques:</p>\n" |
|||
"<p><i>${ctx.get('route_exception').message}</i></p>\n" |
|||
"</div>" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model,name:fetchmail_notify_error_to_sender.model_mail_thread |
|||
msgid "Email Thread" |
|||
msgstr "Discussion de courriel" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model.fields,field_description:fetchmail_notify_error_to_sender.field_fetchmail_server_error_notice_template_id |
|||
msgid "Error notice template" |
|||
msgstr "Erreur dans le modèle de notice" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model,name:fetchmail_notify_error_to_sender.model_fetchmail_server |
|||
msgid "POP/IMAP Server" |
|||
msgstr "Serveur POP/IMAP" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:mail.template,subject:fetchmail_notify_error_to_sender.email_template_error_notice |
|||
msgid "Receiving error with: ${ctx.get('sender_message').get('subject')|safe}" |
|||
msgstr "" |
|||
"Reçu une erreur avec : ${ctx.get('sender_message').get('subject')|safe}" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model.fields,help:fetchmail_notify_error_to_sender.field_fetchmail_server_error_notice_template_id |
|||
msgid "" |
|||
"Set here the template to use to send notice to sender when errors occur " |
|||
"while fetching email" |
|||
msgstr "" |
|||
"Choisissez ici le modèle à utiliser pour informer l'expéditeur lorsque des " |
|||
"erreurs surviennent lors de la récupération du courriel. " |
@ -0,0 +1,61 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * fetchmail_notify_error_to_sender |
|||
# |
|||
# Translators: |
|||
# Bole <bole@dajmi5.com>, 2017 |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 9.0c\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2017-07-15 02:48+0000\n" |
|||
"PO-Revision-Date: 2017-07-15 02:48+0000\n" |
|||
"Last-Translator: Bole <bole@dajmi5.com>, 2017\n" |
|||
"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Language: hr\n" |
|||
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:mail.template,body_html:fetchmail_notify_error_to_sender.email_template_error_notice |
|||
msgid "" |
|||
"\n" |
|||
"<div>\n" |
|||
" <p>Hello ${ctx.get('sender_message').get('from')},</p>\n" |
|||
" <p>we got a problem with your email: <i>${ctx.get('sender_message').get('subject')}</i></p>\n" |
|||
" <p>Maybe you used a wrong recipient address?</p>\n" |
|||
" <p><br/></p>\n" |
|||
" <p>Technical details:</p>\n" |
|||
" <p><i>${ctx.get('route_exception').message}</i></p>\n" |
|||
"</div>\n" |
|||
" " |
|||
msgstr "" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model,name:fetchmail_notify_error_to_sender.model_mail_thread |
|||
msgid "Email Thread" |
|||
msgstr "" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model.fields,field_description:fetchmail_notify_error_to_sender.field_fetchmail_server_error_notice_template_id |
|||
msgid "Error notice template" |
|||
msgstr "" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model,name:fetchmail_notify_error_to_sender.model_fetchmail_server |
|||
msgid "POP/IMAP Server" |
|||
msgstr "POP/IMAP Server" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:mail.template,subject:fetchmail_notify_error_to_sender.email_template_error_notice |
|||
msgid "Receiving error with: ${ctx.get('sender_message').get('subject')|safe}" |
|||
msgstr "" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model.fields,help:fetchmail_notify_error_to_sender.field_fetchmail_server_error_notice_template_id |
|||
msgid "" |
|||
"Set here the template to use to send notice to sender when errors occur " |
|||
"while fetching email" |
|||
msgstr "" |
@ -0,0 +1,61 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * fetchmail_notify_error_to_sender |
|||
# |
|||
# Translators: |
|||
# OCA Transbot <transbot@odoo-community.org>, 2017 |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 9.0c\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2017-07-15 02:48+0000\n" |
|||
"PO-Revision-Date: 2017-07-15 02:48+0000\n" |
|||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n" |
|||
"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Language: it\n" |
|||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:mail.template,body_html:fetchmail_notify_error_to_sender.email_template_error_notice |
|||
msgid "" |
|||
"\n" |
|||
"<div>\n" |
|||
" <p>Hello ${ctx.get('sender_message').get('from')},</p>\n" |
|||
" <p>we got a problem with your email: <i>${ctx.get('sender_message').get('subject')}</i></p>\n" |
|||
" <p>Maybe you used a wrong recipient address?</p>\n" |
|||
" <p><br/></p>\n" |
|||
" <p>Technical details:</p>\n" |
|||
" <p><i>${ctx.get('route_exception').message}</i></p>\n" |
|||
"</div>\n" |
|||
" " |
|||
msgstr "" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model,name:fetchmail_notify_error_to_sender.model_mail_thread |
|||
msgid "Email Thread" |
|||
msgstr "Discussione Email" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model.fields,field_description:fetchmail_notify_error_to_sender.field_fetchmail_server_error_notice_template_id |
|||
msgid "Error notice template" |
|||
msgstr "Modello per il messaggio di errore" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model,name:fetchmail_notify_error_to_sender.model_fetchmail_server |
|||
msgid "POP/IMAP Server" |
|||
msgstr "Server POP/IMAP" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:mail.template,subject:fetchmail_notify_error_to_sender.email_template_error_notice |
|||
msgid "Receiving error with: ${ctx.get('sender_message').get('subject')|safe}" |
|||
msgstr "" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model.fields,help:fetchmail_notify_error_to_sender.field_fetchmail_server_error_notice_template_id |
|||
msgid "" |
|||
"Set here the template to use to send notice to sender when errors occur " |
|||
"while fetching email" |
|||
msgstr "" |
@ -0,0 +1,60 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * fetchmail_notify_error_to_sender |
|||
# |
|||
# Translators: |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: server-tools (8.0)\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2016-09-16 09:29+0000\n" |
|||
"PO-Revision-Date: 2015-09-18 13:55+0000\n" |
|||
"Last-Translator: <>\n" |
|||
"Language-Team: Portuguese (Portugal) (http://www.transifex.com/oca/OCA-server-tools-8-0/language/pt_PT/)\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Language: pt_PT\n" |
|||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:mail.template,body_html:fetchmail_notify_error_to_sender.email_template_error_notice |
|||
msgid "" |
|||
"\n" |
|||
"<div>\n" |
|||
" <p>Hello ${ctx.get('sender_message').get('from')},</p>\n" |
|||
" <p>we got a problem with your email: <i>${ctx.get('sender_message').get('subject')}</i></p>\n" |
|||
" <p>Maybe you used a wrong recipient address?</p>\n" |
|||
" <p><br/></p>\n" |
|||
" <p>Technical details:</p>\n" |
|||
" <p><i>${ctx.get('route_exception').message}</i></p>\n" |
|||
"</div>\n" |
|||
" " |
|||
msgstr "" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model,name:fetchmail_notify_error_to_sender.model_mail_thread |
|||
msgid "Email Thread" |
|||
msgstr "Tópico de Email" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: field:fetchmail.server,error_notice_template_id:0 |
|||
msgid "Error notice template" |
|||
msgstr "" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model,name:fetchmail_notify_error_to_sender.model_fetchmail_server |
|||
msgid "POP/IMAP Server" |
|||
msgstr "" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:mail.template,subject:fetchmail_notify_error_to_sender.email_template_error_notice |
|||
msgid "Receiving error with: ${ctx.get('sender_message').get('subject')|safe}" |
|||
msgstr "" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: help:fetchmail.server,error_notice_template_id:0 |
|||
msgid "" |
|||
"Set here the template to use to send notice to sender when errors occur " |
|||
"while fetching email" |
|||
msgstr "" |
@ -0,0 +1,73 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * fetchmail_notify_error_to_sender |
|||
# |
|||
# Translators: |
|||
# OCA Transbot <transbot@odoo-community.org>, 2017 |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 9.0c\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2017-07-15 02:48+0000\n" |
|||
"PO-Revision-Date: 2017-07-15 02:48+0000\n" |
|||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n" |
|||
"Language-Team: Turkish (https://www.transifex.com/oca/teams/23907/tr/)\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Language: tr\n" |
|||
"Plural-Forms: nplurals=2; plural=(n > 1);\n" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:mail.template,body_html:fetchmail_notify_error_to_sender.email_template_error_notice |
|||
msgid "" |
|||
"\n" |
|||
"<div>\n" |
|||
" <p>Hello ${ctx.get('sender_message').get('from')},</p>\n" |
|||
" <p>we got a problem with your email: <i>${ctx.get('sender_message').get('subject')}</i></p>\n" |
|||
" <p>Maybe you used a wrong recipient address?</p>\n" |
|||
" <p><br/></p>\n" |
|||
" <p>Technical details:</p>\n" |
|||
" <p><i>${ctx.get('route_exception').message}</i></p>\n" |
|||
"</div>\n" |
|||
" " |
|||
msgstr "" |
|||
"\n" |
|||
"<div>\n" |
|||
" <p>Merhaba ${ctx.get('sender_message').get('from')},</p>\n" |
|||
" <p>E-postanız ile ilgili bir problem var: <i>${ctx.get('sender_message').get('subject')}</i></p>\n" |
|||
" <p>Belki alıcı adresi yanlıştır?</p>\n" |
|||
" <p><br/></p>\n" |
|||
" <p>Teknik detaylar:</p>\n" |
|||
" <p><i>${ctx.get('route_exception').message}</i></p>\n" |
|||
"</div>\n" |
|||
" " |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model,name:fetchmail_notify_error_to_sender.model_mail_thread |
|||
msgid "Email Thread" |
|||
msgstr "Eposta konuşması" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model.fields,field_description:fetchmail_notify_error_to_sender.field_fetchmail_server_error_notice_template_id |
|||
msgid "Error notice template" |
|||
msgstr "Hata bildirim şablonu" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model,name:fetchmail_notify_error_to_sender.model_fetchmail_server |
|||
msgid "POP/IMAP Server" |
|||
msgstr "POP/IMAP sunucu" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:mail.template,subject:fetchmail_notify_error_to_sender.email_template_error_notice |
|||
msgid "Receiving error with: ${ctx.get('sender_message').get('subject')|safe}" |
|||
msgstr "Alınan hata : ${ctx.get('sender_message').get('subject')|safe}" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model.fields,help:fetchmail_notify_error_to_sender.field_fetchmail_server_error_notice_template_id |
|||
msgid "" |
|||
"Set here the template to use to send notice to sender when errors occur " |
|||
"while fetching email" |
|||
msgstr "" |
|||
"E-posta alınırken oluşan hatalarda gönderilecek bildirim mesajı için şablonu" |
|||
" belirleyin." |
@ -0,0 +1,61 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * fetchmail_notify_error_to_sender |
|||
# |
|||
# Translators: |
|||
# Jeffery CHEN <jeffery9@gmail.com>, 2017 |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 9.0c\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2017-07-15 02:48+0000\n" |
|||
"PO-Revision-Date: 2017-07-15 02:48+0000\n" |
|||
"Last-Translator: Jeffery CHEN <jeffery9@gmail.com>, 2017\n" |
|||
"Language-Team: Chinese (China) (https://www.transifex.com/oca/teams/23907/zh_CN/)\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Language: zh_CN\n" |
|||
"Plural-Forms: nplurals=1; plural=0;\n" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:mail.template,body_html:fetchmail_notify_error_to_sender.email_template_error_notice |
|||
msgid "" |
|||
"\n" |
|||
"<div>\n" |
|||
" <p>Hello ${ctx.get('sender_message').get('from')},</p>\n" |
|||
" <p>we got a problem with your email: <i>${ctx.get('sender_message').get('subject')}</i></p>\n" |
|||
" <p>Maybe you used a wrong recipient address?</p>\n" |
|||
" <p><br/></p>\n" |
|||
" <p>Technical details:</p>\n" |
|||
" <p><i>${ctx.get('route_exception').message}</i></p>\n" |
|||
"</div>\n" |
|||
" " |
|||
msgstr "" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model,name:fetchmail_notify_error_to_sender.model_mail_thread |
|||
msgid "Email Thread" |
|||
msgstr "" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model.fields,field_description:fetchmail_notify_error_to_sender.field_fetchmail_server_error_notice_template_id |
|||
msgid "Error notice template" |
|||
msgstr "" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model,name:fetchmail_notify_error_to_sender.model_fetchmail_server |
|||
msgid "POP/IMAP Server" |
|||
msgstr "POP/IMAP 服务器" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:mail.template,subject:fetchmail_notify_error_to_sender.email_template_error_notice |
|||
msgid "Receiving error with: ${ctx.get('sender_message').get('subject')|safe}" |
|||
msgstr "" |
|||
|
|||
#. module: fetchmail_notify_error_to_sender |
|||
#: model:ir.model.fields,help:fetchmail_notify_error_to_sender.field_fetchmail_server_error_notice_template_id |
|||
msgid "" |
|||
"Set here the template to use to send notice to sender when errors occur " |
|||
"while fetching email" |
|||
msgstr "" |
@ -1,75 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Copyright (C) 2015 Lorenzo Battistini <lorenzo.battistini@agilebg.com> |
|||
# |
|||
# This program is free software: you can redistribute it and/or modify |
|||
# it under the terms of the GNU Affero General Public License as published |
|||
# by the Free Software Foundation, either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU Affero General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Affero General Public License |
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
|
|||
from openerp.osv import osv |
|||
|
|||
|
|||
class mail_thread(osv.AbstractModel): |
|||
_inherit = 'mail.thread' |
|||
|
|||
def message_route_verify( |
|||
self, cr, uid, message, message_dict, route, update_author=True, |
|||
assert_model=True, create_fallback=True, allow_private=False, |
|||
context=None |
|||
): |
|||
res = () |
|||
if context is None: |
|||
context = {} |
|||
try: |
|||
res = super(mail_thread, self).message_route_verify( |
|||
cr, uid, message, message_dict, route, |
|||
update_author=update_author, assert_model=assert_model, |
|||
create_fallback=create_fallback, allow_private=allow_private, |
|||
context=context) |
|||
except ValueError as ve: |
|||
fetchmail_server_id = context.get('fetchmail_server_id') |
|||
if not fetchmail_server_id: |
|||
raise ve |
|||
fetchmail_server = self.pool['fetchmail.server'].browse( |
|||
cr, uid, fetchmail_server_id, context) |
|||
if not fetchmail_server.error_notice_template_id: |
|||
raise ve |
|||
context['sender_message'] = message |
|||
context['route_exception'] = ve |
|||
self.pool['email.template'].send_mail( |
|||
cr, uid, fetchmail_server.error_notice_template_id.id, |
|||
fetchmail_server.id, context=context) |
|||
context['error_notice_sent'] = True |
|||
return res |
|||
|
|||
def message_route( |
|||
self, cr, uid, message, message_dict, model=None, thread_id=None, |
|||
custom_values=None, context=None |
|||
): |
|||
if context is None: |
|||
context = {} |
|||
res = [] |
|||
try: |
|||
res = super(mail_thread, self).message_route( |
|||
cr, uid, message, message_dict, model=model, |
|||
thread_id=thread_id, custom_values=custom_values, |
|||
context=context) |
|||
except ValueError as ve: |
|||
if context.get('error_notice_sent'): |
|||
# avoid raising exception and setting mail message UNSEEN |
|||
return [] |
|||
else: |
|||
raise ve |
|||
return res |
@ -0,0 +1,6 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright 2017 Eficent <http://www.eficent.com> |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|||
|
|||
from . import fetchmail |
|||
from . import mail_thread |
@ -0,0 +1,15 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright 2015 Lorenzo Battistini <lorenzo.battistini@agilebg.com> |
|||
# Copyright 2017 Eficent <http://www.eficent.com> |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|||
|
|||
from odoo import fields, models |
|||
|
|||
|
|||
class FetchmailServer(models.Model): |
|||
|
|||
_inherit = 'fetchmail.server' |
|||
error_notice_template_id = fields.Many2one( |
|||
'mail.template', string="Error notice template", |
|||
help="Set here the template to use to send notice to sender when " |
|||
"errors occur while fetching email") |
@ -0,0 +1,32 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright 2015-2017 Lorenzo Battistini <lorenzo.battistini@agilebg.com> |
|||
# Copyright 2017 Eficent <http://www.eficent.com> |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|||
|
|||
from odoo import api, models |
|||
|
|||
|
|||
class MailThread(models.AbstractModel): |
|||
_inherit = 'mail.thread' |
|||
|
|||
@api.model |
|||
def message_route(self, message, message_dict, model=None, thread_id=None, |
|||
custom_values=None): |
|||
try: |
|||
res = super(MailThread, self).message_route( |
|||
message, message_dict, model=model, thread_id=thread_id, |
|||
custom_values=custom_values) |
|||
except ValueError as ve: |
|||
fetchmail_server_id = self.env.context.get('fetchmail_server_id') |
|||
if not fetchmail_server_id: |
|||
raise ve |
|||
fetchmail_server = self.env['fetchmail.server'].with_context({ |
|||
'sender_message': message, |
|||
'route_exception': ve, |
|||
}).browse(fetchmail_server_id) |
|||
if not fetchmail_server.error_notice_template_id: |
|||
raise ve |
|||
fetchmail_server.error_notice_template_id.send_mail( |
|||
fetchmail_server.id) |
|||
raise ve |
|||
return res |
@ -1,16 +1,13 @@ |
|||
<?xml version="1.0"?> |
|||
<openerp> |
|||
<data> |
|||
|
|||
<odoo> |
|||
<record model="ir.ui.view" id="view_email_server_form"> |
|||
<field name="name">fetchmail.server.form</field> |
|||
<field name="model">fetchmail.server</field> |
|||
<field name="inherit_id" ref="fetchmail.view_email_server_form"></field> |
|||
<field name="inherit_id" ref="fetchmail.view_email_server_form"/> |
|||
<field name="arch" type="xml"> |
|||
<field name="active" position="after"> |
|||
<field name="error_notice_template_id"></field> |
|||
<field name="error_notice_template_id"/> |
|||
</field> |
|||
</field> |
|||
</record> |
|||
</data> |
|||
</openerp> |
|||
</odoo> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue