[patch] [fix] material rename

This commit is contained in:
Rushabh Mehta 2013-03-26 21:34:38 +05:30
parent c09831f8f2
commit 80fee65ed2

View File

@ -3,8 +3,11 @@ import webnotes, os, sys
def execute():
webnotes.reload_doc("core", "doctype", "doctype")
webnotes.rename_doc("DocType", "Purchase Request Item", "Material Request Item", force=True)
webnotes.rename_doc("DocType", "Purchase Request", "Material Request", force=True)
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)
webnotes.reload_doc("buying", "search_criteria", "pending_po_items_to_bill")
webnotes.reload_doc("buying", "search_criteria", "pending_po_items_to_receive")