diff --git a/accounts/page/accounts_home/accounts_home.html b/accounts/page/accounts_home/accounts_home.html
index 3a6f2b8426a..db87a497208 100644
--- a/accounts/page/accounts_home/accounts_home.html
+++ b/accounts/page/accounts_home/accounts_home.html
@@ -12,7 +12,7 @@
Bills raised by Suppliers
-
+
Structure of books of accounts
@@ -74,7 +74,7 @@
href="#!Financial Statements">Financial Statements
diff --git a/accounts/page/accounts_home/accounts_home.js b/accounts/page/accounts_home/accounts_home.js
index 8e71151e656..3815578d34c 100644
--- a/accounts/page/accounts_home/accounts_home.js
+++ b/accounts/page/accounts_home/accounts_home.js
@@ -22,11 +22,4 @@ pscript['onload_accounts-home'] = function(wrapper) {
$('.india-specific').toggle(false);
}
- if(wn.boot.profile.roles.indexOf('Accounts Manager')==-1 && wn.boot.profile.roles.indexOf('Accounts User')==-1) {
- $('[href*="Accounts Browser"]').each(function() {
- var txt = $(this).text();
- $(this).parent().css('color', '#999').html(txt);
- });
- }
-
}
diff --git a/public/js/modules.js b/public/js/modules.js
index a9e82d6ff8d..9b554e99670 100644
--- a/public/js/modules.js
+++ b/public/js/modules.js
@@ -128,7 +128,10 @@ erpnext.module_page.hide_links = function(wrapper) {
// pages
$(wrapper).find('[data-role]').each(function() {
- if(!has_common(user_roles, [$(this).attr("data-role"), "System Manager"])) {
+ // can define multiple roles
+ var data_roles = $(this).attr("data-role").split(",").map(function(role) {
+ return role.trim(); });
+ if(!has_common(user_roles, ["System Manager"].concat(data_roles))) {
var html = $(this).html();
$(this).parent().css('color', '#999');
$(this).replaceWith('