From ecf9aa146c7d38520480236a67467b1e02a748a3 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 1 Jun 2026 16:40:41 +0000 Subject: [PATCH] chore(serial_and_batch_bundle): remove update_serial_or_batch method (backport #55481) (#55515) Co-authored-by: Diptanil Saha Co-authored-by: Mihir Kandoi --- .../serial_and_batch_bundle.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py b/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py index 8cf96a149d7..1ac6afd15b1 100644 --- a/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py +++ b/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py @@ -2194,25 +2194,6 @@ def update_serial_batch_no_ledgers(bundle, entries, child_row, parent_doc, wareh return doc -@frappe.whitelist() -def update_serial_or_batch(bundle_id, serial_no=None, batch_no=None): - if batch_no and not serial_no: - if qty := frappe.db.get_value( - "Serial and Batch Entry", {"parent": bundle_id, "batch_no": batch_no}, "qty" - ): - frappe.db.set_value( - "Serial and Batch Entry", {"parent": bundle_id, "batch_no": batch_no}, "qty", qty + 1 - ) - return - - doc = frappe.get_cached_doc("Serial and Batch Bundle", bundle_id) - if not serial_no and not batch_no: - return - - doc.append("entries", {"serial_no": serial_no, "batch_no": batch_no, "qty": 1}) - doc.save(ignore_permissions=True) - - def get_serial_and_batch_ledger(**kwargs): kwargs = frappe._dict(kwargs)