Menu
SuiteCRM Pull Request Party hosted by SalesAgility
Welcome, Guest
Username: Password: Remember me

TOPIC: Hiding Modules from "Report Module" dropdown in Reports

Hiding Modules from "Report Module" dropdown in Reports 1 week 14 hours ago #86840

  • bs165
  • bs165's Avatar
  • Offline
  • New Member
  • Posts: 17
  • Thank you received: 1
  • Karma: 0
I have been trying to find a solution for hiding unnecessary modules from being reportable in SuiteCRM 7.11.6:
  • I have tried creating a reportmodulesdefs.php in the custom folder and using $exemptmodules[] = 'Bugs'; as explained here: community.sugarcrm.com/thread/33086-how-...portmodulesdefs-file
  • I have tried using visibility settings for users but it does not seem to take the option from "Report Module".
  • I have also noted that in /modules/AOR_Reports/vardefs.php, the 'options' available for the report module array is defined as 'aor_moduleList', but cannot find this list to try updating it to fit my needs.

Please let me know if I am heading in the right direction toward finding a solution for this, as it has been tripping me up for a few days now.
The administrator has disabled public write access.

Hiding Modules from "Report Module" dropdown in Reports 1 week 8 hours ago #86873

  • AlxGr
  • AlxGr's Avatar
  • Offline
  • Elite Member
  • Posts: 238
  • Thank you received: 46
  • Karma: 6
The administrator has disabled public write access.
The following user(s) said Thank You: bs165

Hiding Modules from "Report Module" dropdown in Reports 5 days 17 hours ago #86954

  • bs165
  • bs165's Avatar
  • Offline
  • New Member
  • Posts: 17
  • Thank you received: 1
  • Karma: 0
In my case some modules need to be available on menus but just not on reports, would there be a way to modify your code to do so? Such as, is there an opposite to your $report_include_modules ? Thank you for the reply!
The administrator has disabled public write access.

Hiding Modules from "Report Module" dropdown in Reports 5 days 12 hours ago #86973

  • bs165
  • bs165's Avatar
  • Offline
  • New Member
  • Posts: 17
  • Thank you received: 1
  • Karma: 0
Also, I attempted your fix, but a quick repair/rebuild seemed to overwrite the modules.ext.php file in custom/application/Ext/Include; is that intended or does it sound like user error on my part with configuration?
The administrator has disabled public write access.

Hiding Modules from "Report Module" dropdown in Reports 5 days 11 hours ago #86976

  • bs165
  • bs165's Avatar
  • Offline
  • New Member
  • Posts: 17
  • Thank you received: 1
  • Karma: 0
I made it work using your code in /custom/Extension, but it breaks my environment every time, displaying this error (below my code) on a blank page for trying to hide any class:
$beanList['Contacts'] = 'Contacts';
$beanFiles['Contacts'] = 'modules/Contacts/Contact.php';
$modules_exempt_from_availability_check['Contacts'] = 'Contacts';
$report_include_modules['Contacts'] = 'Contacts';
$modInvisList[] = 'Contacts';

Fatal error: Uncaught Error: Class 'Contacts' not found in /var/www/html/suitecrm/include/MVC/SugarModule.php:113 Stack trace: #0 /var/www/html/suitecrm/modules/Users/User.php(2006): SugarModule->loadBean() #1 /var/www/html/suitecrm/modules/Users/User.php(2104): User->_getModulesForACL('admin') #2 /var/www/html/suitecrm/modules/Users/User.php(2125): User->getAdminModules() #3 /var/www/html/suitecrm/modules/ACLActions/ACLAction.php(511): User->isAdminForModule('Accounts') #4 /var/www/html/suitecrm/modules/ACL/ACLController.php(153): ACLAction::userHasAccess('99e630da-930f-8...', 'Accounts', 'edit', 'module', true, false) #5 /var/www/html/suitecrm/modules/Accounts/Menu.php(55): ACLController::checkAccess('Accounts', 'edit', true) #6 /var/www/html/suitecrm/include/MVC/View/SugarView.php(1392): require('/var/www/html/s...') #7 /var/www/html/suitecrm/include/MVC/View/SugarView.php(741): SugarView->getMenu('Accounts') #8 /var/www/html/suitecrm/include/MVC/View/SugarView.php(218): SugarView->displayHeader() #9 /var/www/html/suit in /var/www/html/suitecrm/include/MVC/SugarModule.php on line 113

please advise if you know of a user error I am making
The administrator has disabled public write access.

Hiding Modules from "Report Module" dropdown in Reports 4 days 14 hours ago #87015

  • AlxGr
  • AlxGr's Avatar
  • Offline
  • Elite Member
  • Posts: 238
  • Thank you received: 46
  • Karma: 6
Follow these steps:

1. Go to Admin >Display Modules and Subpanels and to hide both: the module and the subpanel for the required module.
2. Create file custom\Extension\application\Ext\Include\Contacts.php and add the following code
$beanList['Contacts'] = 'Contacts';
$beanFiles['Contacts'] = 'modules/Contacts/Contact.php';
$modules_exempt_from_availability_check['Contacts'] = 'Contacts';
$report_include_modules['Contacts'] = 'Contacts';
$modInvisList[] = 'Contacts';

3. Do a quick repair/rebuild

That should solve your issues.

Thanks.
The administrator has disabled public write access.
The following user(s) said Thank You: bs165

Hiding Modules from "Report Module" dropdown in Reports 4 days 14 hours ago #87017

  • bs165
  • bs165's Avatar
  • Offline
  • New Member
  • Posts: 17
  • Thank you received: 1
  • Karma: 0
Thank you again for your reply, at this point I am just looking to hide the two default modules (Email Addresses and Users) from the Report Modules dropdown, but these are the only two that are not able to be disabled from Roles and do not show up in 'Display Modules and Subpanels'. When I tried using your code in this way:
$beanList['EmailAddresses'] = 'EmailAddresses';
$beanFiles['EmailAddresses'] = 'modules/EmailAddresses/EmailAddress.php';
$modules_exempt_from_availability_check['EmailAddresses'] = 'EmailAddresses';
$report_include_modules['EmailAddresses'] = 'EmailAddresses';
$modInvisList[] = 'EmailAddresses';

I get the same as above error message. Any ideas on how to hide those two modules from reporting?
The administrator has disabled public write access.

Hiding Modules from "Report Module" dropdown in Reports 14 hours 52 minutes ago #87154

  • bs165
  • bs165's Avatar
  • Offline
  • New Member
  • Posts: 17
  • Thank you received: 1
  • Karma: 0
I have found how to hide those two modules (and really any others) from report modules, it is not upgrade safe but the fix is to make a separate dropdown list that is a duplicate of moduleList, except it has the undesired modules removed (in my case modulesListR), and to change modules/AOR_Reports/AOR_Report.php line 156 from
$app_list_strings['aor_moduleList'] = $app_list_strings['moduleList'];

to
$app_list_strings['aor_moduleList'] = $app_list_strings['moduleListR'];

now I am just trying to hide certain options from the module tree section, please let me know if you have any suggestions.
The administrator has disabled public write access.
Time to create page: 0.033 seconds
Powered by Kunena Forum