diff --git a/erpnext/patches/june_2012/reports_list_permission.py b/erpnext/patches/june_2012/reports_list_permission.py new file mode 100644 index 0000000000..2f47bf16b6 --- /dev/null +++ b/erpnext/patches/june_2012/reports_list_permission.py @@ -0,0 +1,18 @@ +def execute(): + """allow read permission to all for report list""" + import webnotes + import webnotes.model.doc + new_perms = [ + { + 'parent': 'Report', + 'parentfield': 'permissions', + 'parenttype': 'DocType', + 'role': 'All', + 'permlevel': 0, + 'read': 1, + }, + ] + for perms in new_perms: + doc = webnotes.model.doc.Document('DocPerm') + doc.fields.update(perms) + doc.save() \ No newline at end of file diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py index 7404b55889..b4717803a4 100644 --- a/erpnext/patches/patch_list.py +++ b/erpnext/patches/patch_list.py @@ -427,4 +427,9 @@ patch_list = [ 'patch_file': 'fetch_organization_from_lead', 'description': 'Fetch organization from lead in quote' }, + { + 'patch_module': 'patches.june_2012', + 'patch_file': 'reports_list_permission', + 'description': 'allow read permission to all for report list' + }, ] \ No newline at end of file diff --git a/erpnext/utilities/page/todo/todo.js b/erpnext/utilities/page/todo/todo.js index 01065a70c3..8cd8fc1e5f 100644 --- a/erpnext/utilities/page/todo/todo.js +++ b/erpnext/utilities/page/todo/todo.js @@ -20,14 +20,31 @@ erpnext.todo.refresh = function() { wn.call({ method: 'utilities.page.todo.todo.get', callback: function(r,rt) { - $('#todo-list div.todo-content').empty(); - $('#assigned-todo-list div.todo-content').empty(); + var todo_list = $('#todo-list div.todo-content'); + var assigned_todo_list = $('#assigned-todo-list div.todo-content'); + todo_list.empty(); + assigned_todo_list.empty(); + + var nothing_to_do = function() { + $('#todo-list div.todo-content') + .html('