[Rename] Delivery Note Packing Item -> Packed Item

This commit is contained in:
Nabin Hait
2013-10-18 12:28:18 +05:30
parent 096d363087
commit d05a3b3b5c
4 changed files with 295 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
# 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 "tabPacked Item" not in tables:
webnotes.rename_doc("DocType", "Delivery Note Packing Item", "Packed Item", force=True)
webnotes.reload_doc("stock", "doctype", "packed_item")
os.system("rm -rf app/stock/doctype/delivery_note_packing_item")
if webnotes.conn.exists("DocType", "Delivery Note Packing Item"):
webnotes.delete_doc("DocType", "Delivery Note Packing Item")