diff --git a/erpnext/patches/jan_mar_2012/update_stockreco_perm.py b/erpnext/patches/jan_mar_2012/update_stockreco_perm.py new file mode 100644 index 00000000000..9c3c6974cd4 --- /dev/null +++ b/erpnext/patches/jan_mar_2012/update_stockreco_perm.py @@ -0,0 +1,3 @@ +def execute(): + import webnotes + webnotes.conn.sql("update `tabDocPerm` set cancel = 1 where parent = 'Stock Reconciliation' and ifnull(submit, 0) = 1") diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py index 85a11a591d6..2bfaf08e15f 100644 --- a/erpnext/patches/patch_list.py +++ b/erpnext/patches/patch_list.py @@ -182,5 +182,10 @@ patch_list = [ 'patch_file': 'remove_series_defval', 'description': 'Remove rv series default value' }, + { + 'patch_module': 'patches.jan_mar_2012', + 'patch_file': 'update_stockreco_perm', + 'description': 'Update stock reco permission' + }, ]