From 8242816a24b88b40782a548402e0060c1d97ad07 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Fri, 16 Aug 2024 11:27:08 +0530 Subject: [PATCH] fix: not able to create the batch (#42784) --- erpnext/stock/doctype/batch/batch.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/erpnext/stock/doctype/batch/batch.js b/erpnext/stock/doctype/batch/batch.js index 6730040708..58264f52b5 100644 --- a/erpnext/stock/doctype/batch/batch.js +++ b/erpnext/stock/doctype/batch/batch.js @@ -3,15 +3,15 @@ frappe.ui.form.on('Batch', { setup: (frm) => { - frm.fields_dict['item'].get_query = function(doc, cdt, cdn) { + frm.set_query("item", () => { return { query: "erpnext.controllers.queries.item_query", - filters:{ - 'is_stock_item': 1, - 'has_batch_no': 1 - } - } - } + filters: { + is_stock_item: 1, + has_batch_no: 1, + }, + }; + }); }, refresh: (frm) => { if(!frm.is_new()) { -- GitLab