From 66a68ecbf3111d038d97188f80510cf48a2dd72f Mon Sep 17 00:00:00 2001 From: Florian da Costa Date: Wed, 22 Feb 2023 12:45:30 +0100 Subject: [PATCH 1/2] [FIX] email template on sql_export_mail --- sql_export_mail/data/mail_template.xml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/sql_export_mail/data/mail_template.xml b/sql_export_mail/data/mail_template.xml index d5d40a75a..ca64eb05b 100644 --- a/sql_export_mail/data/mail_template.xml +++ b/sql_export_mail/data/mail_template.xml @@ -5,19 +5,21 @@ SQL Export admin@example.com - ${object.get_email_address_for_template()} - ${object.name or ''} + {{object.get_email_address_for_template()}} + {{object.name or ''}} - + +
-

You will find the report ${object.name or ''} as an attachment of the mail.

+

You will find the report as an attachment of the mail.

- ]]>
+
From 755bd3b5cdd8241b93d9cb1e158cf327657371de Mon Sep 17 00:00:00 2001 From: Florian da Costa Date: Mon, 19 Jun 2023 10:32:30 +0200 Subject: [PATCH 2/2] [IMP] sql_export_mail : Add migration script to fix email template --- .../16.0.1.0.0/noupdate_changes.xml | 19 +++++++++++++++++++ .../migrations/16.0.1.0.0/post-migration.py | 8 ++++++++ 2 files changed, 27 insertions(+) create mode 100644 sql_export_mail/migrations/16.0.1.0.0/noupdate_changes.xml create mode 100644 sql_export_mail/migrations/16.0.1.0.0/post-migration.py diff --git a/sql_export_mail/migrations/16.0.1.0.0/noupdate_changes.xml b/sql_export_mail/migrations/16.0.1.0.0/noupdate_changes.xml new file mode 100644 index 000000000..fe76bd1f4 --- /dev/null +++ b/sql_export_mail/migrations/16.0.1.0.0/noupdate_changes.xml @@ -0,0 +1,19 @@ + + + + + {{object.get_email_address_for_template()}} + {{object.name or ''}} + +
+ +

You will find the report as an attachment of the mail.

+ +
+
+
+
diff --git a/sql_export_mail/migrations/16.0.1.0.0/post-migration.py b/sql_export_mail/migrations/16.0.1.0.0/post-migration.py new file mode 100644 index 000000000..bea37ae39 --- /dev/null +++ b/sql_export_mail/migrations/16.0.1.0.0/post-migration.py @@ -0,0 +1,8 @@ +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.load_data( + env.cr, "sql_export_mail", "migrations/16.0.1.0.0/noupdate_changes.xml" + )