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 1/3] 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 + }, + }; + }); }, }); From b64f5a4e542f94c7b066532c665daf2437a5d76b Mon Sep 17 00:00:00 2001 From: "Nihantra C. Patel" <141945075+Nihantra-Patel@users.noreply.github.com> Date: Wed, 8 May 2024 10:38:58 +0530 Subject: [PATCH 2/3] fix: not allow template item in product bundle item --- erpnext/selling/doctype/product_bundle/product_bundle.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/selling/doctype/product_bundle/product_bundle.js b/erpnext/selling/doctype/product_bundle/product_bundle.js index 618d1e532bb..aed54dd4358 100644 --- a/erpnext/selling/doctype/product_bundle/product_bundle.js +++ b/erpnext/selling/doctype/product_bundle/product_bundle.js @@ -12,8 +12,8 @@ frappe.ui.form.on("Product Bundle", { frm.set_query("item_code", "items", () => { return { - "filters": { - "has_variants": 0 + filters: { + has_variants: 0 }, }; }); From 8fb329467458eb7317c7e5c31721ad351158e26b Mon Sep 17 00:00:00 2001 From: "Nihantra C. Patel" <141945075+Nihantra-Patel@users.noreply.github.com> Date: Wed, 8 May 2024 10:40:24 +0530 Subject: [PATCH 3/3] fix: not allow template item in product bundle item --- erpnext/selling/doctype/product_bundle/product_bundle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/selling/doctype/product_bundle/product_bundle.js b/erpnext/selling/doctype/product_bundle/product_bundle.js index aed54dd4358..67b9ae5ba31 100644 --- a/erpnext/selling/doctype/product_bundle/product_bundle.js +++ b/erpnext/selling/doctype/product_bundle/product_bundle.js @@ -13,7 +13,7 @@ frappe.ui.form.on("Product Bundle", { frm.set_query("item_code", "items", () => { return { filters: { - has_variants: 0 + has_variants: 0, }, }; });