patch to delete warehouses with docstatus = 2

This commit is contained in:
Anand Doshi
2013-02-28 16:45:37 +05:30
parent a71ace0d74
commit a8caa5edef
2 changed files with 10 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
import webnotes
def execute():
for w in webnotes.conn.sql("""select name from `tabWarehouse` where docstatus=2"""):
try:
webnotes.delete_doc("Warehouse", w[0])
except webnotes.ValidationError:
pass