Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions base_report_to_printer/static/src/js/qweb_action_manager.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,14 @@ async function cupsReportActionHandler(action, options, env) {
env.services.notification.add(_t("Successfully sent to printer!"), {
type: "success",
});
const {onClose} = options;
if (action.close_on_report_download) {
return env.services.action.doAction(
{type: "ir.actions.act_window_close"},
{onClose}
);
} else if (onClose) {
onClose();
}
// Return a truthy value so the action manager considers the report
// handled. The action manager itself takes care of
// `close_on_report_download` and the `onClose` callback.
return true;
// In case of exception during the job, we won't get any response. So we
// should flag the exception and notify the user
}

env.services.notification.add(_t("Could not sent to printer!"), {
type: "danger",
});
Expand Down
Loading