From 8ce541bf46cf3265b2697454086f1327a33d1224 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 3 Mar 2026 17:11:53 +0530 Subject: [PATCH] fix: serial no status for Disassemble entry (cherry picked from commit 81acefa8adf625b4b9905abda43832c25a9d8847) --- erpnext/stock/serial_batch_bundle.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index 92dc2942250..896b43088ad 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -444,6 +444,11 @@ class SerialBatchBundle: if sle.voucher_type in ["Sales Invoice", "Delivery Note"] and sle.actual_qty < 0: customer = frappe.get_cached_value(sle.voucher_type, sle.voucher_no, "customer") + if sle.voucher_type in ["Stock Entry"] and sle.actual_qty < 0: + purpose = frappe.get_cached_value("Stock Entry", sle.voucher_no, "purpose") + if purpose in ["Disassemble", "Material Receipt"]: + status = "Inactive" + sn_table = frappe.qb.DocType("Serial No") query = (