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

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

(cherry picked from commit 32c4fab14f)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
mergify[bot]
2024-08-16 11:39:15 +05:30
committed by GitHub
parent 3be037221a
commit 0f9849e672

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()) {