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', + } ]