diff --git a/base_export_async/__manifest__.py b/base_export_async/__manifest__.py
index 9dba8ddd5e..3f6611d192 100644
--- a/base_export_async/__manifest__.py
+++ b/base_export_async/__manifest__.py
@@ -6,7 +6,7 @@
'summary': """
Asynchronous export with job queue
""",
- 'version': '12.0.1.1.0',
+ 'version': '12.0.1.1.1',
'license': 'AGPL-3',
'author': 'ACSONE SA/NV, Odoo Community Association (OCA)',
'website': 'https://github.com/OCA/queue',
@@ -20,6 +20,7 @@
'security/ir_rule.xml',
'data/config_parameter.xml',
'data/cron.xml',
+ 'data/mail_template_data.xml',
],
'demo': [
],
diff --git a/base_export_async/data/mail_template_data.xml b/base_export_async/data/mail_template_data.xml
new file mode 100644
index 0000000000..e1f8904e8b
--- /dev/null
+++ b/base_export_async/data/mail_template_data.xml
@@ -0,0 +1,19 @@
+
+ Your export is available here. It will be automatically deleted the ${object.expiration_date}. This is an automated message please do not reply.
+
Your export is available here.
-It will be automatically deleted the {}.
--
- This is an automated message please do not reply. -
- """).format(url, expiration_date), - 'auto_delete': True, - }) + mail_template = self.env.ref( + 'base_export_async.delay_export_mail_template', + raise_if_not_found=False + ) + if mail_template: + export_record.write( + { + "url": url, + "expiration_date": expiration_date, + "model_description": model_description, + } + ) + mail_template.send_mail( + export_record.id, + force_send=False, + email_values={ + "email_from": email_from, + "reply_to": email_from, + "recipient_ids": [(6, 0, users.mapped("partner_id").ids)], + }, + ) @api.model def cron_delete(self):