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:04:38 +00:00
|
|
|
tables = webnotes.conn.sql_list("sthow tables")
|
|
|
|
if not "Material Request Item" in tables:
|
|
|
|
webnotes.rename_doc("DocType", "Purchase Request Item", "Material Request Item", force=True)
|
|
|
|
if not "Material Request" in tables:
|
|
|
|
webnotes.rename_doc("DocType", "Purchase Request", "Material Request", force=True)
|
2013-02-18 08:21:41 +00:00
|
|
|
webnotes.reload_doc("buying", "search_criteria", "pending_po_items_to_bill")
|
2013-02-18 08:54:05 +00:00
|
|
|
webnotes.reload_doc("buying", "search_criteria", "pending_po_items_to_receive")
|
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")
|
|
|
|
|