Browse Source

[MIG] fetchmail_notify_error_to_sender: Migration to 12.0

pull/1485/head
hveficent 5 years ago
committed by mreficent
parent
commit
7ccabcca1e
  1. 10
      fetchmail_notify_error_to_sender/README.rst
  2. 2
      fetchmail_notify_error_to_sender/__manifest__.py
  3. 8
      fetchmail_notify_error_to_sender/static/description/index.html
  4. 11
      fetchmail_notify_error_to_sender/tests/test_fetchmail_notify_error_to_sender.py

10
fetchmail_notify_error_to_sender/README.rst

@ -14,13 +14,13 @@ Fetchmail Notify Error to Sender
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3 :alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github
:target: https://github.com/OCA/server-tools/tree/11.0/fetchmail_notify_error_to_sender
:target: https://github.com/OCA/server-tools/tree/12.0/fetchmail_notify_error_to_sender
:alt: OCA/server-tools :alt: OCA/server-tools
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-tools-11-0/server-tools-11-0-fetchmail_notify_error_to_sender
:target: https://translation.odoo-community.org/projects/server-tools-12-0/server-tools-12-0-fetchmail_notify_error_to_sender
:alt: Translate me on Weblate :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/149/11.0
:target: https://runbot.odoo-community.org/runbot/149/12.0
:alt: Try me on Runbot :alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5| |badge1| |badge2| |badge3| |badge4| |badge5|
@ -55,7 +55,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_. Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
In case of trouble, please check there if your issue has already been reported. 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 If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20fetchmail_notify_error_to_sender%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20fetchmail_notify_error_to_sender%0Aversion:%2012.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. Do not contact contributors directly about support or help with technical issues.
@ -89,6 +89,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use. promote its widespread use.
This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/11.0/fetchmail_notify_error_to_sender>`_ project on GitHub.
This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/12.0/fetchmail_notify_error_to_sender>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

2
fetchmail_notify_error_to_sender/__manifest__.py

@ -6,7 +6,7 @@
{ {
'name': 'Fetchmail Notify Error to Sender', 'name': 'Fetchmail Notify Error to Sender',
'summary': 'If fetching mails gives error, send an email to sender', 'summary': 'If fetching mails gives error, send an email to sender',
'version': '11.0.1.0.0',
'version': '12.0.1.0.0',
'category': 'Tools', 'category': 'Tools',
'author': 'author':
"Agile Business Group,Eficent,Odoo Community Association (OCA)", "Agile Business Group,Eficent,Odoo Community Association (OCA)",

8
fetchmail_notify_error_to_sender/static/description/index.html

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.14: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.13.1: http://docutils.sourceforge.net/" />
<title>Fetchmail Notify Error to Sender</title> <title>Fetchmail Notify Error to Sender</title>
<style type="text/css"> <style type="text/css">
@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !! !! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !! !! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.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/server-tools/tree/11.0/fetchmail_notify_error_to_sender"><img alt="OCA/server-tools" src="https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/server-tools-11-0/server-tools-11-0-fetchmail_notify_error_to_sender"><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/149/11.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="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.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/server-tools/tree/12.0/fetchmail_notify_error_to_sender"><img alt="OCA/server-tools" src="https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/server-tools-12-0/server-tools-12-0-fetchmail_notify_error_to_sender"><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/149/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>If fetchmail is not able to correctly route an email, the email is <p>If fetchmail is not able to correctly route an email, the email is
“silently” lost (you get an error message in server log).</p> “silently” lost (you get an error message in server log).</p>
<p>For example, if you configure odoo mail system to route received emails <p>For example, if you configure odoo mail system to route received emails
@ -402,7 +402,7 @@ correctly process the received email.</p>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-tools/issues">GitHub Issues</a>. <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-tools/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported. 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 If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/server-tools/issues/new?body=module:%20fetchmail_notify_error_to_sender%0Aversion:%2011.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/server-tools/issues/new?body=module:%20fetchmail_notify_error_to_sender%0Aversion:%2012.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> <p>Do not contact contributors directly about support or help with technical issues.</p>
</div> </div>
<div class="section" id="credits"> <div class="section" id="credits">
@ -430,7 +430,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use.</p> promote its widespread use.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-tools/tree/11.0/fetchmail_notify_error_to_sender">OCA/server-tools</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-tools/tree/12.0/fetchmail_notify_error_to_sender">OCA/server-tools</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> <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>
</div> </div>

11
fetchmail_notify_error_to_sender/tests/test_fetchmail_notify_error_to_sender.py

@ -2,12 +2,12 @@
import socket import socket
from odoo.addons.mail.tests.common import TestMail
from odoo.addons.mail.tests.test_mail_gateway import MAIL_TEMPLATE
from odoo.addons.test_mail.data.test_mail_data import MAIL_TEMPLATE
from odoo.addons.test_mail.tests.test_mail_gateway import TestMailgateway
from odoo.tools import mute_logger from odoo.tools import mute_logger
class TestFetchmailNotifyErrorToSender(TestMail):
class TestFetchmailNotifyErrorToSender(TestMailgateway):
def setUp(self): def setUp(self):
super(TestFetchmailNotifyErrorToSender, self).setUp() super(TestFetchmailNotifyErrorToSender, self).setUp()
@ -27,7 +27,8 @@ class TestFetchmailNotifyErrorToSender(TestMail):
email_from='Sylvie Lelitre <test.sylvie.lelitre@agrolait.com>', email_from='Sylvie Lelitre <test.sylvie.lelitre@agrolait.com>',
cc_email='', cc_email='',
msg_id='<1198923581.41972151344608186760.JavaMail@agrolait.com>', msg_id='<1198923581.41972151344608186760.JavaMail@agrolait.com>',
model=None, target_model='mail.test', target_field='name', ctx=False,
model=None, target_model='mail.test.simple', target_field='name',
ctx=None
): ):
self.assertFalse(self.env[target_model].search([ self.assertFalse(self.env[target_model].search([
(target_field, '=', subject), (target_field, '=', subject),
@ -61,7 +62,7 @@ class TestFetchmailNotifyErrorToSender(TestMail):
to_email='noone@example.com', to_email='noone@example.com',
subject='spam', subject='spam',
extra='In-Reply-To: <12321321-openerp-%d-mail.test@%s>' % ( extra='In-Reply-To: <12321321-openerp-%d-mail.test@%s>' % (
self.test_public.id,
self.test_record.id,
socket.gethostname(), socket.gethostname(),
), ),
ctx={ ctx={

Loading…
Cancel
Save