From 9864377b47800b86f4a0a63c1e0e6f3f35e170a8 Mon Sep 17 00:00:00 2001 From: "Nihantra C. Patel" <141945075+Nihantra-Patel@users.noreply.github.com> Date: Wed, 8 May 2024 10:32:28 +0530 Subject: [PATCH] fix: not allow template item in product bundle item - v15/v14 --- erpnext/selling/doctype/product_bundle/product_bundle.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/erpnext/selling/doctype/product_bundle/product_bundle.js b/erpnext/selling/doctype/product_bundle/product_bundle.js index 3096b692a7e..618d1e532bb 100644 --- a/erpnext/selling/doctype/product_bundle/product_bundle.js +++ b/erpnext/selling/doctype/product_bundle/product_bundle.js @@ -9,5 +9,13 @@ frappe.ui.form.on("Product Bundle", { query: "erpnext.selling.doctype.product_bundle.product_bundle.get_new_item_code", }; }); + + frm.set_query("item_code", "items", () => { + return { + "filters": { + "has_variants": 0 + }, + }; + }); }, });