From 8d97290c061b5cd8f8872c26fb33a28213536b6e Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 31 Jul 2012 14:12:23 +0530 Subject: [PATCH 1/2] updated bin permission --- erpnext/patches/july_2012/bin_permission.py | 3 +++ erpnext/patches/patch_list.py | 5 ++++- erpnext/stock/doctype/bin/bin.txt | 8 ++++---- 3 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 erpnext/patches/july_2012/bin_permission.py diff --git a/erpnext/patches/july_2012/bin_permission.py b/erpnext/patches/july_2012/bin_permission.py new file mode 100644 index 0000000000..e1d0ea6f95 --- /dev/null +++ b/erpnext/patches/july_2012/bin_permission.py @@ -0,0 +1,3 @@ +def execute(): + import webnotes + webnotes.conn.sql("update `tabDocPerm` set permlevel = 0 where parent = 'Bin'") \ No newline at end of file diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py index 6be98cd532..b84c956b36 100644 --- a/erpnext/patches/patch_list.py +++ b/erpnext/patches/patch_list.py @@ -501,5 +501,8 @@ patch_list = [ 'patch_module': 'patches.july_2012', 'patch_file': 'blog_guest_permission', }, - + { + 'patch_module': 'patches.july_2012', + 'patch_file': 'bin_permission', + }, ] \ No newline at end of file diff --git a/erpnext/stock/doctype/bin/bin.txt b/erpnext/stock/doctype/bin/bin.txt index 7956e67af3..ce20a2df30 100644 --- a/erpnext/stock/doctype/bin/bin.txt +++ b/erpnext/stock/doctype/bin/bin.txt @@ -3,9 +3,9 @@ # These values are common in all dictionaries { - 'creation': '2012-03-27 14:36:27', + 'creation': '2012-05-15 12:15:04', 'docstatus': 0, - 'modified': '2012-03-27 14:36:27', + 'modified': '2012-07-31 14:10:42', 'modified_by': u'Administrator', 'owner': u'Administrator' }, @@ -26,7 +26,7 @@ 'section_style': u'Simple', 'server_code_error': u' ', 'show_in_menu': 0, - 'version': 115 + 'version': 1 }, # These values are common for all DocField @@ -36,7 +36,7 @@ 'parent': u'Bin', 'parentfield': u'fields', 'parenttype': u'DocType', - 'permlevel': 1 + 'permlevel': 0 }, # These values are common for all DocPerm From f9360ce5627e810b9a0024f629dd512ed30bf473 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 31 Jul 2012 17:27:11 +0530 Subject: [PATCH 2/2] filter on actual qty in stock level report --- erpnext/stock/doctype/bin/bin.txt | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/erpnext/stock/doctype/bin/bin.txt b/erpnext/stock/doctype/bin/bin.txt index ce20a2df30..158dbde2f2 100644 --- a/erpnext/stock/doctype/bin/bin.txt +++ b/erpnext/stock/doctype/bin/bin.txt @@ -5,7 +5,7 @@ { 'creation': '2012-05-15 12:15:04', 'docstatus': 0, - 'modified': '2012-07-31 14:10:42', + 'modified': '2012-07-31 17:23:42', 'modified_by': u'Administrator', 'owner': u'Administrator' }, @@ -46,6 +46,7 @@ 'parent': u'Bin', 'parentfield': u'permissions', 'parenttype': u'DocType', + 'permlevel': 0, 'read': 1 }, @@ -58,28 +59,24 @@ # DocPerm { 'doctype': u'DocPerm', - 'permlevel': 1, 'role': u'Sales Manager' }, # DocPerm { 'doctype': u'DocPerm', - 'permlevel': 1, 'role': u'Sales User' }, # DocPerm { 'doctype': u'DocPerm', - 'permlevel': 1, 'role': u'Purchase Manager' }, # DocPerm { 'doctype': u'DocPerm', - 'permlevel': 1, 'role': u'Purchase User' }, @@ -89,7 +86,6 @@ 'cancel': 0, 'create': 0, 'doctype': u'DocPerm', - 'permlevel': 1, 'role': u'Material User', 'submit': 0, 'write': 0 @@ -101,7 +97,6 @@ 'cancel': 0, 'create': 0, 'doctype': u'DocPerm', - 'permlevel': 0, 'role': u'Material Manager', 'submit': 0, 'write': 0 @@ -162,7 +157,7 @@ 'doctype': u'DocField', 'fieldname': u'actual_qty', 'fieldtype': u'Currency', - 'in_filter': 0, + 'in_filter': 1, 'label': u'Actual Quantity', 'oldfieldname': u'actual_qty', 'oldfieldtype': u'Currency',