From 46848a48fe3478fa1a1101650189eb894812108c Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 25 Jan 2012 17:15:46 +0530 Subject: [PATCH] Show DocType Labels instead of DocType names in Customize Form View --- erpnext/patches/jan_mar_2012/doclabel_in_doclayer.py | 12 ++++++++++++ erpnext/patches/patch_list.py | 5 +++++ 2 files changed, 17 insertions(+) create mode 100644 erpnext/patches/jan_mar_2012/doclabel_in_doclayer.py diff --git a/erpnext/patches/jan_mar_2012/doclabel_in_doclayer.py b/erpnext/patches/jan_mar_2012/doclabel_in_doclayer.py new file mode 100644 index 0000000000..eae0d21c9c --- /dev/null +++ b/erpnext/patches/jan_mar_2012/doclabel_in_doclayer.py @@ -0,0 +1,12 @@ +import webnotes +def execute(): + """ + * Change option of doclayer's doc_type field + * Reload doclayer + """ + webnotes.conn.sql(""" + UPDATE `tabDocField` SET options=NULL + WHERE parent='DocLayer' AND fieldname='doc_type' + """) + from webnotes.modules.module_manager import reload_doc + reload_doc('core', 'doctype', 'doclayer') diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py index edce3c3d69..2193207837 100644 --- a/erpnext/patches/patch_list.py +++ b/erpnext/patches/patch_list.py @@ -40,4 +40,9 @@ patch_list = [ 'patch_file': 'customer_address_contact_patch', 'description': "Install Customer Address Contact report and run patches regarding primary address and contact" }, + { + 'patch_module': 'patches.jan_mar_2012', + 'patch_file': 'doclabel_in_doclayer', + 'description': "Show DocType Labels instead of DocType names in Customize Form View" + }, ]