From a431b649b728f083ea41df0fd1597ef50486b1bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miquel=20Ra=C3=AFch?= Date: Thu, 16 Mar 2023 14:41:52 +0100 Subject: [PATCH] [FIX] fetchmail_notify_error_to_sender: jinja -> qweb --- .../__manifest__.py | 2 +- .../data/email_template_data.xml | 36 ++++++++++--------- .../15.0.1.0.1/noupdate_changes.xml | 33 +++++++++++++++++ .../migrations/15.0.1.0.1/post-migration.py | 11 ++++++ 4 files changed, 65 insertions(+), 17 deletions(-) create mode 100644 fetchmail_notify_error_to_sender/migrations/15.0.1.0.1/noupdate_changes.xml create mode 100644 fetchmail_notify_error_to_sender/migrations/15.0.1.0.1/post-migration.py diff --git a/fetchmail_notify_error_to_sender/__manifest__.py b/fetchmail_notify_error_to_sender/__manifest__.py index e40c000ea..d4e0ef1f3 100644 --- a/fetchmail_notify_error_to_sender/__manifest__.py +++ b/fetchmail_notify_error_to_sender/__manifest__.py @@ -6,7 +6,7 @@ { "name": "Fetchmail Notify Error to Sender", "summary": "If fetching mails gives error, send an email to sender", - "version": "15.0.1.0.0", + "version": "15.0.1.0.1", "category": "Tools", "author": "Agile Business Group,ForgeFlow,Odoo Community Association (OCA)", "website": "https://github.com/OCA/server-tools", 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 5c0dd2c0d..965921b0f 100644 --- a/fetchmail_notify_error_to_sender/data/email_template_data.xml +++ b/fetchmail_notify_error_to_sender/data/email_template_data.xml @@ -1,27 +1,31 @@ - + Fetchmail - error notice - ${ctx.get('sender_message').get('to')|safe} - ${ctx.get('sender_message').get('from')|safe} + {{ctx.get('sender_message').get('to')}} + {{ctx.get('sender_message').get('from')}} Receiving error with: ${ctx.get('sender_message').get('subject')|safe} + >Receiving error with: {{ctx.get('sender_message').get('subject')}} - ${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')}

+ {{ctx.get('lang')}} + +
+

+

+

Hello ,

+

we got a problem with your email:

+

Maybe you used a wrong recipient address?

+


+

Technical details:

+

+
+

- ]]>
+
diff --git a/fetchmail_notify_error_to_sender/migrations/15.0.1.0.1/noupdate_changes.xml b/fetchmail_notify_error_to_sender/migrations/15.0.1.0.1/noupdate_changes.xml new file mode 100644 index 000000000..12490ba5e --- /dev/null +++ b/fetchmail_notify_error_to_sender/migrations/15.0.1.0.1/noupdate_changes.xml @@ -0,0 +1,33 @@ + + + + +
+

+

+

Hello ,

+

we got a problem with your email:

+

Maybe you used a wrong recipient address?

+

+
+

+

Technical details:

+

+ + + +

+
+

+
+
+ {{ctx.get('sender_message').get('to')}} + {{ctx.get('sender_message').get('from')}} + {{ctx.get('lang')}} + Receiving error with: {{ctx.get('sender_message').get('subject')}} +
+
diff --git a/fetchmail_notify_error_to_sender/migrations/15.0.1.0.1/post-migration.py b/fetchmail_notify_error_to_sender/migrations/15.0.1.0.1/post-migration.py new file mode 100644 index 000000000..7cc451527 --- /dev/null +++ b/fetchmail_notify_error_to_sender/migrations/15.0.1.0.1/post-migration.py @@ -0,0 +1,11 @@ +# Copyright 2023 ForgeFlow +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.load_data( + env.cr, + "fetchmail_notify_error_to_sender", + "migrations/15.0.1.0.1/noupdate_changes.xml", + )