diff --git a/fetchmail_notify_error_to_sender/README.rst b/fetchmail_notify_error_to_sender/README.rst index 2fa99caef..3f27c836b 100644 --- a/fetchmail_notify_error_to_sender/README.rst +++ b/fetchmail_notify_error_to_sender/README.rst @@ -35,7 +35,7 @@ Usage .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/149/9.0 + :target: https://runbot.odoo-community.org/runbot/149/11.0 Bug Tracker =========== @@ -58,6 +58,7 @@ Contributors * Lorenzo Battistini * Miquel Raïch (migration to v9 and v10) +* Hai Dinh (migration to V11) Maintainer ---------- diff --git a/fetchmail_notify_error_to_sender/__init__.py b/fetchmail_notify_error_to_sender/__init__.py index 226b25b5f..69f7babdf 100644 --- a/fetchmail_notify_error_to_sender/__init__.py +++ b/fetchmail_notify_error_to_sender/__init__.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2015 Lorenzo Battistini -# Copyright 2017 Eficent # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import models diff --git a/fetchmail_notify_error_to_sender/__manifest__.py b/fetchmail_notify_error_to_sender/__manifest__.py index 357519a65..41d01ee05 100644 --- a/fetchmail_notify_error_to_sender/__manifest__.py +++ b/fetchmail_notify_error_to_sender/__manifest__.py @@ -1,14 +1,15 @@ -# -*- coding: utf-8 -*- # Copyright 2015 Lorenzo Battistini # Copyright 2017 Eficent +# Copyright 2018 Hai Dinh # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { 'name': 'Fetchmail Notify Error to Sender', 'summary': 'If fetching mails gives error, send an email to sender', - 'version': '10.0.1.0.0', + 'version': '11.0.1.0.0', 'category': 'Tools', - 'author': "Agile Business Group,Eficent,Odoo Community Association (OCA)", + 'author': + "Agile Business Group,Eficent,Odoo Community Association (OCA)", 'website': 'https://github.com/OCA/server-tools', 'license': 'AGPL-3', 'depends': [ diff --git a/fetchmail_notify_error_to_sender/data/email_template_data.xml b/fetchmail_notify_error_to_sender/data/email_template_data.xml index 6e1371509..2a90fad4b 100644 --- a/fetchmail_notify_error_to_sender/data/email_template_data.xml +++ b/fetchmail_notify_error_to_sender/data/email_template_data.xml @@ -1,24 +1,24 @@ - - - Fetchmail - error notice - ${ctx.get('sender_message').get('to')|safe} - ${ctx.get('sender_message').get('from')|safe} - Receiving error with: ${ctx.get('sender_message').get('subject')|safe} - - - - ${ctx.get('lang')} - -

Hello ${ctx.get('sender_message').get('from')},

-

we got a problem with your email: ${ctx.get('sender_message').get('subject')}

-

Maybe you used a wrong recipient address?

-


-

Technical details:

-

${ctx.get('route_exception').message}

- - ]]>
-
+ + + Fetchmail - error notice + ${ctx.get('sender_message').get('to')|safe} + ${ctx.get('sender_message').get('from')|safe} + Receiving error with: ${ctx.get('sender_message').get('subject')|safe} + + + + ${ctx.get('lang')} + +

Hello ${ctx.get('sender_message').get('from')},

+

we got a problem with your email: ${ctx.get('sender_message').get('subject')}

+

Maybe you used a wrong recipient address?

+


+

Technical details:

+

${ctx.get('route_exception').message}

+ + ]]>
+
diff --git a/fetchmail_notify_error_to_sender/models/__init__.py b/fetchmail_notify_error_to_sender/models/__init__.py index e18df9772..33189fb89 100644 --- a/fetchmail_notify_error_to_sender/models/__init__.py +++ b/fetchmail_notify_error_to_sender/models/__init__.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017 Eficent # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import fetchmail diff --git a/fetchmail_notify_error_to_sender/models/fetchmail.py b/fetchmail_notify_error_to_sender/models/fetchmail.py index 3192cba51..2becf8f2e 100644 --- a/fetchmail_notify_error_to_sender/models/fetchmail.py +++ b/fetchmail_notify_error_to_sender/models/fetchmail.py @@ -1,14 +1,14 @@ -# -*- coding: utf-8 -*- # Copyright 2015 Lorenzo Battistini # Copyright 2017 Eficent +# Copyright 2018 Hai Dinh # 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 " diff --git a/fetchmail_notify_error_to_sender/models/mail_thread.py b/fetchmail_notify_error_to_sender/models/mail_thread.py index d90a19086..1ab797fc2 100644 --- a/fetchmail_notify_error_to_sender/models/mail_thread.py +++ b/fetchmail_notify_error_to_sender/models/mail_thread.py @@ -1,6 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright 2015-2017 Lorenzo Battistini # Copyright 2017 Eficent +# Copyright 2018 Hai Dinh # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import api, models diff --git a/fetchmail_notify_error_to_sender/views/fetchmail_view.xml b/fetchmail_notify_error_to_sender/views/fetchmail_view.xml index 39b2023c6..40d7ba9f4 100644 --- a/fetchmail_notify_error_to_sender/views/fetchmail_view.xml +++ b/fetchmail_notify_error_to_sender/views/fetchmail_view.xml @@ -1,13 +1,13 @@ - - fetchmail.server.form - fetchmail.server - - - - - + + fetchmail.server.form + fetchmail.server + + + + - + +