From 29349711e429aff51385a4573b7bca3b5c0cea52 Mon Sep 17 00:00:00 2001 From: Krishna Shirsath Date: Fri, 7 Aug 2026 13:44:57 +0530 Subject: [PATCH 1/2] fix: optimize product bundle item search (cherry picked from commit b3867f142890c46e178afe1ebe7d96f32582a22a) # Conflicts: # erpnext/selling/doctype/product_bundle/product_bundle.js --- .../doctype/product_bundle/product_bundle.js | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/erpnext/selling/doctype/product_bundle/product_bundle.js b/erpnext/selling/doctype/product_bundle/product_bundle.js index 3096b692a7e..931a83af429 100644 --- a/erpnext/selling/doctype/product_bundle/product_bundle.js +++ b/erpnext/selling/doctype/product_bundle/product_bundle.js @@ -9,5 +9,28 @@ frappe.ui.form.on("Product Bundle", { query: "erpnext.selling.doctype.product_bundle.product_bundle.get_new_item_code", }; }); +<<<<<<< HEAD +======= + frm.set_query("item_code", "items", () => { + return { + query: "erpnext.controllers.queries.item_query", + }; + }); + + // A submitted bundle is immutable. To change it, create a new version + // (a fresh draft copied from this one) and submit that instead. + if (frm.doc.docstatus === 1) { + frm.add_custom_button( + __("New Version"), + () => { + frappe.model.open_mapped_doc({ + method: "erpnext.selling.doctype.product_bundle.product_bundle.make_new_version", + frm: frm, + }); + }, + __("Actions") + ); + } +>>>>>>> b3867f1428 (fix: optimize product bundle item search) }, }); From 693cade177054e4353078601677903cdfbc7e0cb Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Fri, 7 Aug 2026 16:07:36 +0530 Subject: [PATCH 2/2] chore: resolve conflict --- .../doctype/product_bundle/product_bundle.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/erpnext/selling/doctype/product_bundle/product_bundle.js b/erpnext/selling/doctype/product_bundle/product_bundle.js index 931a83af429..adbe4e728cf 100644 --- a/erpnext/selling/doctype/product_bundle/product_bundle.js +++ b/erpnext/selling/doctype/product_bundle/product_bundle.js @@ -9,28 +9,10 @@ frappe.ui.form.on("Product Bundle", { query: "erpnext.selling.doctype.product_bundle.product_bundle.get_new_item_code", }; }); -<<<<<<< HEAD -======= frm.set_query("item_code", "items", () => { return { query: "erpnext.controllers.queries.item_query", }; }); - - // A submitted bundle is immutable. To change it, create a new version - // (a fresh draft copied from this one) and submit that instead. - if (frm.doc.docstatus === 1) { - frm.add_custom_button( - __("New Version"), - () => { - frappe.model.open_mapped_doc({ - method: "erpnext.selling.doctype.product_bundle.product_bundle.make_new_version", - frm: frm, - }); - }, - __("Actions") - ); - } ->>>>>>> b3867f1428 (fix: optimize product bundle item search) }, });