From f102a57995a4dd49d5f148df4fe7c56f124ac113 Mon Sep 17 00:00:00 2001 From: Merlin <158784988+merlinz01@users.noreply.github.com> Date: Sat, 3 Jan 2026 14:56:50 -0500 Subject: [PATCH] [FIX] report_attachment_preview: support `close_on_report_download` report action option Add functionality to close window after report download if specified. --- report_attachment_preview/static/src/js/report_utils.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/report_attachment_preview/static/src/js/report_utils.js b/report_attachment_preview/static/src/js/report_utils.js index 0ad779e875..f38291e317 100644 --- a/report_attachment_preview/static/src/js/report_utils.js +++ b/report_attachment_preview/static/src/js/report_utils.js @@ -44,6 +44,9 @@ registry.category("ir.actions.report handlers").add("pdf_report_preview", if (["upgrade", "ok"].includes(state)) { const url = getReportUrl(action, "pdf"); window.open(url); + if (action.close_on_report_download) { + env.services.action.doAction({ type: "ir.actions.act_window_close" }); + } return true; } else { return _executeReportClientAction(action, options);