From 3519d7de018720c7be7f678d1d2748e3c52495d1 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 10 Dec 2012 19:37:49 +0530 Subject: [PATCH] fixed production cleanup patch --- patches/december_2012/production_cleanup.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/patches/december_2012/production_cleanup.py b/patches/december_2012/production_cleanup.py index 6a17dbaeac..8e226bdfd4 100644 --- a/patches/december_2012/production_cleanup.py +++ b/patches/december_2012/production_cleanup.py @@ -10,11 +10,18 @@ def delete_doctypes(): delete_doc("DocType", "BOM Control") def rename_module(): + webnotes.reload_doc("core", "doctype", "role") + webnotes.reload_doc("core", "doctype", "page") + webnotes.reload_doc("core", "doctype", "module_def") + webnotes.rename_doc("Role", "Production User", "Manufacturing User") webnotes.rename_doc("Role", "Production Manager", "Manufacturing Manager") - - webnotes.rename_doc("Page", "production-home", "manufacturing-home") - + + if webnotes.conn.exists("Page", "manufacturing-home"): + webnotes.delete_doc("Page", "production-home") + else: + webnotes.rename_doc("Page", "production-home", "manufacturing-home") + webnotes.rename_doc("Module Def", "Production", "Manufacturing") webnotes.conn.set_global("modules_list",