[minor] try block in serial no status patch

This commit is contained in:
Nabin Hait 2013-10-24 17:41:52 +05:30
parent 3898777c9f
commit 96333b6bc7

View File

@ -3,7 +3,6 @@
from __future__ import unicode_literals
import webnotes
from webnotes.utils import flt
def execute():
serial_nos = webnotes.conn.sql("""select name from `tabSerial No` where status!='Not in Use'
@ -14,6 +13,7 @@ def execute():
sr_bean.make_controller().via_stock_ledger = True
sr_bean.run_method("validate")
sr_bean.save()
webnotes.conn.commit()
except:
pass