mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 11:19:09 +00:00
[minor] try block in serial no status patch
This commit is contained in:
@@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import webnotes
|
import webnotes
|
||||||
from webnotes.utils import flt
|
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
serial_nos = webnotes.conn.sql("""select name from `tabSerial No` where status!='Not in Use'
|
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.make_controller().via_stock_ledger = True
|
||||||
sr_bean.run_method("validate")
|
sr_bean.run_method("validate")
|
||||||
sr_bean.save()
|
sr_bean.save()
|
||||||
|
webnotes.conn.commit()
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user