[cleanup] [minor] replaced for territory to applicable territory

This commit is contained in:
Akhilesh Darjee
2013-10-31 19:50:51 +05:30
parent a604acb5c9
commit e158cea77a
20 changed files with 56 additions and 34 deletions

View File

@@ -0,0 +1,21 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes, os
def execute():
webnotes.reload_doc("core", "doctype", "doctype")
tables = webnotes.conn.sql_list("show tables")
if "tabApplicable Territory" not in tables:
webnotes.rename_doc("DocType", "For Territory", "Applicable Territory", force=True)
webnotes.reload_doc("setup", "doctype", "applicable_territory")
if os.path.exists("app/setup/doctype/for_territory"):
os.system("rm -rf app/setup/doctype/for_territory")
if webnotes.conn.exists("DocType", "For Territory"):
webnotes.delete_doc("DocType", "For Territory")