From eca93e11b7dc1c665efbcead2ae610f696d6765c Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Wed, 29 Dec 2021 09:04:21 +0100 Subject: [PATCH] [14.0][FIX] base_report_to_printer: Manage text reports in js too --- base_report_to_printer/static/src/js/qweb_action_manager.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/base_report_to_printer/static/src/js/qweb_action_manager.js b/base_report_to_printer/static/src/js/qweb_action_manager.js index 0113bc8..649e8d0 100644 --- a/base_report_to_printer/static/src/js/qweb_action_manager.js +++ b/base_report_to_printer/static/src/js/qweb_action_manager.js @@ -9,7 +9,7 @@ odoo.define("base_report_to_printer.print", function (require) { _triggerDownload: function (action, options, type) { var self = this; var _super = this._super; - if (type === "pdf") { + if (type === "pdf" || "text") { this._rpc({ model: "ir.actions.report", method: "print_action_for_report_name", @@ -49,9 +49,9 @@ odoo.define("base_report_to_printer.print", function (require) { return _super.apply(self, [action, options, type]); } }); - } else { - return _super.apply(self, [action, options, type]); + return Promise.reject(); } + return _super.apply(self, [action, options, type]); }, }); });