From 8f2002d419047eeb9dcb96ecb71cf8b82bf529f1 Mon Sep 17 00:00:00 2001 From: Rehan Ansari <32939507+rehanrehman389@users.noreply.github.com> Date: Tue, 11 Nov 2025 09:58:33 +0530 Subject: [PATCH] fix: add missing stock entry UOM filtering based on item master (#50135) Co-authored-by: rehansari26 (cherry picked from commit 7baf6ec3d648aa2bbdafd2a49d67c3a5d4a2ff4d) --- erpnext/stock/doctype/stock_entry/stock_entry.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js index 332f05fafd2..a41a529ff2c 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.js +++ b/erpnext/stock/doctype/stock_entry/stock_entry.js @@ -1073,6 +1073,21 @@ erpnext.stock.StockEntry = class StockEntry extends erpnext.stock.StockControlle }; }); + this.frm.set_query("uom", "items", function (doc, cdt, cdn) { + let row = locals[cdt][cdn]; + + if (!row.item_code) { + return; + } + + return { + query: "erpnext.controllers.queries.get_item_uom_query", + filters: { + item_code: row.item_code, + }, + }; + }); + this.frm.fields_dict.items.grid.get_field("expense_account").get_query = function () { if (erpnext.is_perpetual_inventory_enabled(me.frm.doc.company)) { return {