From 6c9ffdc37221c40c76eadc1ee1582628bb81fdfb Mon Sep 17 00:00:00 2001 From: Nikul-OSI Date: Mon, 20 Mar 2023 18:07:44 +0530 Subject: [PATCH] [MIG] report_async: Migrated v15 to v16 --- report_async/__manifest__.py | 2 +- report_async/models/report_async.py | 6 ++++-- report_async/readme/CONTRIBUTORS.rst | 5 +++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/report_async/__manifest__.py b/report_async/__manifest__.py index 0d6ab5fbe..6b29ccc87 100644 --- a/report_async/__manifest__.py +++ b/report_async/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Report Async", "summary": "Central place to run reports live or async", - "version": "15.0.1.0.0", + "version": "16.0.1.0.0", "author": "Ecosoft, Odoo Community Association (OCA)", "license": "AGPL-3", "website": "https://github.com/OCA/reporting-engine", diff --git a/report_async/models/report_async.py b/report_async/models/report_async.py index 0e66ce972..632d67c3c 100644 --- a/report_async/models/report_async.py +++ b/report_async/models/report_async.py @@ -140,7 +140,7 @@ class ReportAsync(models.Model): report = self.env["ir.actions.report"].browse(report_id) func = REPORT_TYPES_FUNC[report.report_type] # Run report - out_file, file_ext = getattr(report, func)(docids, data) + out_file, file_ext = getattr(report, func)(report.xml_id, docids, data) out_file = base64.b64encode(out_file) out_name = "{}.{}".format(report.name, file_ext) # Save report to attachment @@ -170,5 +170,7 @@ class ReportAsync(models.Model): def _send_email(self, attachment): template = self.env.ref("report_async.async_report_delivery") template.send_mail( - attachment.id, notif_layout="mail.mail_notification_light", force_send=False + attachment.id, + email_layout_xmlid="mail.mail_notification_light", + force_send=False, ) diff --git a/report_async/readme/CONTRIBUTORS.rst b/report_async/readme/CONTRIBUTORS.rst index d391cb73d..d01ca6fe9 100644 --- a/report_async/readme/CONTRIBUTORS.rst +++ b/report_async/readme/CONTRIBUTORS.rst @@ -3,3 +3,8 @@ * Kitti U. * Saran Lim. * Tharathip Chaweewongphan + +* Opensourceintegrators + + * Daniel Reis + * Nikul Chaudhary