mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
[14.0][FIX] base_report_to_printer: Manage text reports in js too
This commit is contained in:
@@ -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]);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user