From 72a38929e5f137287c6baa60b7267c19b8efeba2 Mon Sep 17 00:00:00 2001 From: Sagar Vora <16315650+sagarvora@users.noreply.github.com> Date: Tue, 26 Aug 2025 00:29:26 +0530 Subject: [PATCH] fix: correct logic for warehouse field label --- erpnext/public/js/utils/barcode_scanner.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/public/js/utils/barcode_scanner.js b/erpnext/public/js/utils/barcode_scanner.js index 2301726072a..b8d1b4afa2a 100644 --- a/erpnext/public/js/utils/barcode_scanner.js +++ b/erpnext/public/js/utils/barcode_scanner.js @@ -512,7 +512,8 @@ erpnext.utils.BarcodeScanner = class BarcodeScanner { handle_warehouse_scan(data) { const warehouse = data.warehouse; const warehouse_field = this.get_warehouse_field(); - const warehouse_field_label = frappe.meta.get_label(this.items_table_name, warehouse_field); + const cur_grid = this.frm.fields_dict[this.items_table_name].grid; + const warehouse_field_label = frappe.meta.get_label(cur_grid.doctype, warehouse_field); if (!this.last_scanned_warehouse_initialized) { this.setup_last_scanned_warehouse();