From c4bcbea927cd7bf85363d753a59e981fce7c15e9 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 26 Oct 2012 13:23:51 +0530 Subject: [PATCH] added delete permissions for custom script and added autoname method --- patches/october_2012/custom_script_delete_permission.py | 9 +++++++++ patches/patch_list.py | 4 ++++ 2 files changed, 13 insertions(+) create mode 100644 patches/october_2012/custom_script_delete_permission.py diff --git a/patches/october_2012/custom_script_delete_permission.py b/patches/october_2012/custom_script_delete_permission.py new file mode 100644 index 0000000000..cb704d094f --- /dev/null +++ b/patches/october_2012/custom_script_delete_permission.py @@ -0,0 +1,9 @@ +import webnotes +def execute(): + webnotes.conn.sql("""delete from `tabDocPerm` where parent='Custom Script'""") + webnotes.conn.commit() + + from webnotes.model.sync import sync + sync("core", "custom_script", force=1) + + webnotes.conn.begin() \ No newline at end of file diff --git a/patches/patch_list.py b/patches/patch_list.py index 9196363319..8194b86f69 100644 --- a/patches/patch_list.py +++ b/patches/patch_list.py @@ -639,4 +639,8 @@ patch_list = [ 'patch_module': 'patches.october_2012', 'patch_file': 'fix_cancelled_gl_entries', }, + { + 'patch_module': 'patches.october_2012', + 'patch_file': 'custom_script_delete_permission', + } ]