mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 12:19:12 +00:00
patch to delete warehouses with docstatus = 2
This commit is contained in:
9
patches/february_2013/p09_remove_cancelled_warehouses.py
Normal file
9
patches/february_2013/p09_remove_cancelled_warehouses.py
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user