From f4705fd5a85d08c8389e0612e6b62eecca0cc4cf Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 5 Jun 2026 12:17:54 +0530 Subject: [PATCH] refactor(stock): remove dead get_serialized_items method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit get_serialized_items had zero callers anywhere (Python, JS, run_method) on develop and after the refactor; it was relocated into SerialBatchBundleService by mistake instead of being dropped. Delete it — also removes a raw frappe.db.sql_list query that duplicated the ORM helper get_serial_or_batch_items. --- erpnext/stock/services/serial_batch_bundle.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/erpnext/stock/services/serial_batch_bundle.py b/erpnext/stock/services/serial_batch_bundle.py index d628b404aa2..ce8ca4c92f5 100644 --- a/erpnext/stock/services/serial_batch_bundle.py +++ b/erpnext/stock/services/serial_batch_bundle.py @@ -678,15 +678,3 @@ class SerialBatchBundleService: ) .where((doctype.docstatus == 1) & (child_doc.batch_no.isin(batches))) ).run(as_dict=True) - - def get_serialized_items(self): - serialized_items = [] - item_codes = list(set(d.item_code for d in self.doc.get("items"))) - if item_codes: - serialized_items = frappe.db.sql_list( - """select name from `tabItem` - where has_serial_no=1 and name in ({})""".format(", ".join(["%s"] * len(item_codes))), - tuple(item_codes), - ) - - return serialized_items