[14.0][FIX] base_report_to_printer: Manage text reports in js too

This commit is contained in:
Denis Roussel
2021-12-29 09:04:21 +01:00
parent d7809c1a63
commit eca93e11b7

View File

@@ -9,7 +9,7 @@ odoo.define("base_report_to_printer.print", function (require) {
_triggerDownload: function (action, options, type) { _triggerDownload: function (action, options, type) {
var self = this; var self = this;
var _super = this._super; var _super = this._super;
if (type === "pdf") { if (type === "pdf" || "text") {
this._rpc({ this._rpc({
model: "ir.actions.report", model: "ir.actions.report",
method: "print_action_for_report_name", 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]); return _super.apply(self, [action, options, type]);
} }
}); });
} else { return Promise.reject();
return _super.apply(self, [action, options, type]);
} }
return _super.apply(self, [action, options, type]);
}, },
}); });
}); });