From 4b80a81a2e74c78832242f3bc2b9abb212256164 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 13 Jan 2012 11:14:29 +0530 Subject: [PATCH] Rename Search Criteria Patch --- erpnext/patches/old_patches/rename_search_criteria.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 erpnext/patches/old_patches/rename_search_criteria.py diff --git a/erpnext/patches/old_patches/rename_search_criteria.py b/erpnext/patches/old_patches/rename_search_criteria.py new file mode 100644 index 0000000000..e64db03bf6 --- /dev/null +++ b/erpnext/patches/old_patches/rename_search_criteria.py @@ -0,0 +1,9 @@ +import webnotes +from webnotes.model.code import get_obj +def execute(): + for sc in webnotes.conn.sql("""select name from `tabSearch Criteria` where ifnull(name,'') + like 'srch%' or ifnull(name,'') like '%stdsrch'"""): + try: + get_obj('Search Criteria', sc[0]).rename() + except AttributeError, e: + pass