2013-02-18 08:54:05 +00:00
|
|
|
import webnotes, os, sys
|
2013-02-18 08:19:15 +00:00
|
|
|
|
|
|
|
def execute():
|
|
|
|
webnotes.reload_doc("core", "doctype", "doctype")
|
2013-02-20 10:38:21 +00:00
|
|
|
|
2013-03-26 16:20:31 +00:00
|
|
|
tables = webnotes.conn.sql_list("show tables")
|
|
|
|
if not "tabMaterial Request Item" in tables:
|
2013-03-26 16:04:38 +00:00
|
|
|
webnotes.rename_doc("DocType", "Purchase Request Item", "Material Request Item", force=True)
|
2013-03-26 16:20:31 +00:00
|
|
|
if not "tabMaterial Request" in tables:
|
2013-03-26 16:04:38 +00:00
|
|
|
webnotes.rename_doc("DocType", "Purchase Request", "Material Request", force=True)
|
2013-02-18 12:54:28 +00:00
|
|
|
|
2013-02-20 10:38:21 +00:00
|
|
|
webnotes.reload_doc("stock", "doctype", "material_request")
|
|
|
|
webnotes.reload_doc("stock", "doctype", "material_request_item")
|
|
|
|
|
2013-02-18 12:54:28 +00:00
|
|
|
webnotes.conn.sql("""update `tabMaterial Request` set material_request_type='Purchase'""")
|
2013-02-18 08:54:05 +00:00
|
|
|
|
|
|
|
os.system("rm -rf app/buying/doctype/purchase_request")
|
|
|
|
os.system("rm -rf app/buying/doctype/purchase_request_item")
|
|
|
|
|
|
|
|
os.system("rm -rf app/hr/doctype/holiday_block_list")
|
|
|
|
os.system("rm -rf app/hr/doctype/holiday_block_list_allow")
|
|
|
|
os.system("rm -rf app/hr/doctype/holiday_block_list_date")
|
2013-03-26 16:20:31 +00:00
|
|
|
|
2013-05-16 10:27:45 +00:00
|
|
|
for dt in ("Purchase Request", "Purchase Request Item"):
|
|
|
|
if webnotes.conn.exists("DocType", dt):
|
|
|
|
webnotes.delete_doc("DocType", dt)
|
|
|
|
|