From 05e4fc6eb68c8aec65fbc5e9da0900d2d9b606a4 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 6 Apr 2012 15:19:02 +0530 Subject: [PATCH] Chart of account/cc link only for accounts user and account manager role in account home page --- erpnext/accounts/page/accounts_home/accounts_home.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/page/accounts_home/accounts_home.js b/erpnext/accounts/page/accounts_home/accounts_home.js index 4551db0caa..52738a83bd 100644 --- a/erpnext/accounts/page/accounts_home/accounts_home.js +++ b/erpnext/accounts/page/accounts_home/accounts_home.js @@ -19,4 +19,12 @@ pscript['onload_accounts-home'] = function(wrapper) { if(wn.control_panel.country!='India') { $('.india-specific').toggle(false); } -} \ No newline at end of file + + 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); + }); + } + +}