serial no fix

This commit is contained in:
Nabin Hait 2012-07-03 12:24:18 +05:30
parent fdb1993125
commit 594d63ab5d

View File

@ -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)