From 923671cc5620e2b5f91e148e978bb7d43b2b52b6 Mon Sep 17 00:00:00 2001 From: Suherdy Yacob Date: Wed, 3 Jun 2026 11:42:55 +0700 Subject: [PATCH] refactor: update order retrieval method and remove redundant pos service reference in receipt printer logic --- static/src/js/pos_receipt_printer.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/static/src/js/pos_receipt_printer.js b/static/src/js/pos_receipt_printer.js index f8847e5..00ebfd0 100755 --- a/static/src/js/pos_receipt_printer.js +++ b/static/src/js/pos_receipt_printer.js @@ -110,7 +110,7 @@ patch(PosPrinterService.prototype, { // Determine print context const pos = this.env?.services?.pos; const currentPrintContext = pos?.hardwareProxy?.currentPrintContext; - const order = this._currentPrintOrder || currentPrintContext?.order || pos?.get_order(); + const order = this._currentPrintOrder || currentPrintContext?.order || pos?.getOrder(); let printType = currentPrintContext?.printType; if (!printType) { @@ -130,7 +130,6 @@ patch(PosPrinterService.prototype, { const storage = new BluetoothPrinterStorage(); // Get POS config ID dynamically from POS store service - const pos = this.env?.services?.pos; const posConfigId = pos?.config?.id || 1; // Check if user has explicitly bypassed bluetooth printer for this device