mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
[FIX] base_report_to_printer: wrong imports
Some details where not correctly in the fw of
b9e968510c
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
/** @odoo-module */
|
/** @odoo-module */
|
||||||
import {Markup} from "web.utils";
|
|
||||||
import {_t} from "@web/core/l10n/translation";
|
import {_t} from "@web/core/l10n/translation";
|
||||||
|
import {markup} from "@odoo/owl";
|
||||||
import {registry} from "@web/core/registry";
|
import {registry} from "@web/core/registry";
|
||||||
|
|
||||||
async function cupsReportActionHandler(action, options, env) {
|
async function cupsReportActionHandler(action, options, env) {
|
||||||
@@ -38,24 +38,23 @@ async function cupsReportActionHandler(action, options, env) {
|
|||||||
// Just so the translation engine detects them as it doesn't do it inside
|
// Just so the translation engine detects them as it doesn't do it inside
|
||||||
// template strings
|
// template strings
|
||||||
const terms = {
|
const terms = {
|
||||||
the_report: env._t("The report"),
|
the_report: _t("The report"),
|
||||||
couldnt_be_printed: env._t(
|
couldnt_be_printed: _t(
|
||||||
"couldn't be printed. Click on the button below to download it"
|
"couldn't be printed. Click on the button below to download it"
|
||||||
),
|
),
|
||||||
issue_on: env._t("Issue on"),
|
issue_on: _t("Issue on"),
|
||||||
};
|
};
|
||||||
const notificationRemove = env.services.notification.add(
|
const notificationRemove = env.services.notification.add(
|
||||||
Markup(
|
markup(
|
||||||
`<p>${terms.the_report} <strong>${action.name}</strong> ${terms.couldnt_be_printed}</p>`
|
`<p>${terms.the_report} <strong>${action.name}</strong> ${terms.couldnt_be_printed}</p>`
|
||||||
),
|
),
|
||||||
{
|
{
|
||||||
title: `${terms.issue_on} ${print_action.printer_name}`,
|
title: `${terms.issue_on} ${print_action.printer_name}`,
|
||||||
type: "warning",
|
type: "warning",
|
||||||
sticky: true,
|
sticky: true,
|
||||||
messageIsHtml: true,
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: env._t("Print"),
|
name: _t("Print"),
|
||||||
primary: true,
|
primary: true,
|
||||||
icon: "fa-print",
|
icon: "fa-print",
|
||||||
onClick: async () => {
|
onClick: async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user