mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-12 06:01:46 +00:00
refactor(stock): remove dead get_serialized_items method
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user