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]); }, }); });