Merge pull request #13567 from atm-maxime/new_expensereport_tab_remove

Remove expense report tab from user
This commit is contained in:
Laurent Destailleur 2020-04-12 17:11:37 +02:00 committed by GitHub
commit 08301e2696
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View File

@ -102,7 +102,7 @@ class modExpenseReport extends DolibarrModules
$r++;
// Array to add new pages in new tabs
$this->tabs[] = array('data'=>'user:+expensereport:ExpenseReport:expensereport:$user->rights->expensereport->lire:/expensereport/list.php?mainmenu=hrm&id=__ID__');
$this->tabs[] = array();
// Boxes
$this->boxes = array(); // List of boxes

View File

@ -477,6 +477,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ
'MAIN_MODULE_DON'=>'newboxdefonly',
'MAIN_MODULE_ECM'=>'newboxdefonly',
'MAIN_MODULE_EXTERNALSITE'=>'newboxdefonly',
'MAIN_MODULE_EXPENSEREPORT'=>'newboxdefonly',
'MAIN_MODULE_FACTURE'=>'newboxdefonly',
'MAIN_MODULE_FOURNISSEUR'=>'newboxdefonly',
'MAIN_MODULE_HOLIDAY'=>'newboxdefonly',
@ -4697,6 +4698,16 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo
$mod->init($reloadmode);
}
}
elseif ($moduletoreload == 'MAIN_MODULE_EXPENSEREPORT')
{
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Expense Report module");
$res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modExpenseReport.class.php';
if ($res) {
$mod = new modExpenseReport($db);
//$mod->remove('noboxes');
$mod->init($reloadmode);
}
}
elseif ($moduletoreload == 'MAIN_MODULE_DON') // Permission has changed into 3.0
{
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Don module");