From 594d63ab5d0bbeb9319b20e41e75481875cc5e09 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 3 Jul 2012 12:24:18 +0530 Subject: [PATCH] serial no fix --- erpnext/stock/doctype/serial_no/serial_no.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/serial_no/serial_no.py b/erpnext/stock/doctype/serial_no/serial_no.py index 88f1bf21a6..b6dd690023 100644 --- a/erpnext/stock/doctype/serial_no/serial_no.py +++ b/erpnext/stock/doctype/serial_no/serial_no.py @@ -107,7 +107,7 @@ class DocType(TransactionBase): def on_trash(self): if self.doc.status == 'Delivered': msgprint("Cannot trash Serial No : %s as it is already Delivered" % (self.doc.name), raise_exception = 1) - else: + elif self.doc.status == 'In Store': webnotes.conn.set(self.doc, 'status', 'Not in Use') self.make_stock_ledger_entry(-1)