fix: not able to create the batch (#42784)

This commit is contained in:
rohitwaghchaure
2024-08-16 11:27:08 +05:30
committed by GitHub
parent c1a5a0510e
commit 32c4fab14f

View File

@@ -3,7 +3,7 @@
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: {
@@ -11,7 +11,7 @@ frappe.ui.form.on("Batch", {
has_batch_no: 1,
},
};
};
});
},
refresh: (frm) => {
if (!frm.is_new()) {