merge, update bean validations

This commit is contained in:
Rushabh Mehta
2013-03-01 19:09:06 +05:30
26 changed files with 156 additions and 143 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

View File

View File

@@ -0,0 +1,6 @@
import webnotes
def execute():
webnotes.conn.sql("""update `tabPurchase Order Item` set prevdoc_doctype = 'Material Request'
where prevdoc_doctype = 'Purchase Request'""")
webnotes.conn.sql("""update `tabSupplier Quotation Item`
set prevdoc_doctype = 'Material Request' where prevdoc_doctype = 'Purchase Request'""")

View File

@@ -201,4 +201,6 @@ patch_list = [
'execute:webnotes.reload_doc("accounts", "Print Format", "Sales Invoice Spartan") # 2013-02-26',
"execute:(not webnotes.conn.exists('Role', 'Projects Manager')) and webnotes.doc({'doctype':'Role', 'role_name':'Projects Manager'}).insert()",
"execute:(not webnotes.conn.exists('UOM', 'Hour')) and webnotes.doc({'uom_name': 'Unit', 'doctype': 'UOM', 'name': 'Hour'}).insert()",
"patches.february_2013.p09_remove_cancelled_warehouses",
"patches.march_2013.update_po_prevdoc_doctype",
]