forked from alaguraj/odoo-testing-addons
Disable QZ raw printing by default
This commit is contained in:
parent
0333967c90
commit
1cccf85702
@ -123,6 +123,14 @@ function buildEscPosReceipt(receiptElement, order) {
|
||||
patch(ReceiptScreen.prototype, {
|
||||
async printReceipt() {
|
||||
if (this.pos.config.use_qz_printer && this.pos.config.qz_printer_name) {
|
||||
const rawPrintingEnabled = window.localStorage?.getItem("dine360_qz_raw_enabled") === "1";
|
||||
if (!rawPrintingEnabled) {
|
||||
console.warn(
|
||||
"QZ raw receipt printing is disabled. Set localStorage.dine360_qz_raw_enabled = '1' only while testing a raw ESC/POS printer queue."
|
||||
);
|
||||
return super.printReceipt(...arguments);
|
||||
}
|
||||
|
||||
try {
|
||||
if (!window.qz) {
|
||||
console.error("QZ Tray library not loaded.");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user