Fix #8716 : tasks were not shown in ecm auto tree
This commit is contained in:
parent
664eafd810
commit
6abd4cc120
@ -205,12 +205,14 @@ if ($type == 'directory') {
|
||||
'product',
|
||||
'tax',
|
||||
'project',
|
||||
'project_task',
|
||||
'fichinter',
|
||||
'user',
|
||||
'expensereport',
|
||||
'holiday',
|
||||
'recruitment-recruitmentcandidature',
|
||||
'banque',
|
||||
'chequereceipt',
|
||||
'mrp-mo'
|
||||
);
|
||||
|
||||
@ -243,6 +245,8 @@ if ($type == 'directory') {
|
||||
$upload_dir = $conf->tax->dir_output;
|
||||
} elseif ($module == 'project') {
|
||||
$upload_dir = $conf->projet->dir_output;
|
||||
} elseif ($module == 'project_task') {
|
||||
$upload_dir = $conf->projet->dir_output;
|
||||
} elseif ($module == 'fichinter') {
|
||||
$upload_dir = $conf->ficheinter->dir_output;
|
||||
} elseif ($module == 'user') {
|
||||
@ -255,8 +259,10 @@ if ($type == 'directory') {
|
||||
$upload_dir = $conf->recruitment->dir_output.'/recruitmentcandidature';
|
||||
} elseif ($module == 'banque') {
|
||||
$upload_dir = $conf->bank->dir_output;
|
||||
} elseif ($module == 'chequereceipt') {
|
||||
$upload_dir = $conf->bank->dir_output.'/checkdeposits';
|
||||
} elseif ($module == 'mrp-mo') {
|
||||
$upload_dir = $conf->mrp->dir_output.'/mo';
|
||||
$upload_dir = $conf->mrp->dir_output;
|
||||
} else {
|
||||
$parameters = array('modulepart'=>$module);
|
||||
$reshook = $hookmanager->executeHooks('addSectionECMAuto', $parameters);
|
||||
|
||||
@ -1645,6 +1645,9 @@ class FormFile
|
||||
} elseif ($modulepart == 'project') {
|
||||
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
$object_instance = new Project($this->db);
|
||||
} elseif ($modulepart == 'project_task') {
|
||||
include_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
|
||||
$object_instance = new Task($this->db);
|
||||
} elseif ($modulepart == 'fichinter') {
|
||||
include_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
|
||||
$object_instance = new Fichinter($this->db);
|
||||
@ -1663,6 +1666,9 @@ class FormFile
|
||||
} elseif ($modulepart == 'banque') {
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
$object_instance = new Account($this->db);
|
||||
} elseif ($modulepart == 'chequereceipt') {
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php';
|
||||
$object_instance = new RemiseCheque($this->db);
|
||||
} elseif ($modulepart == 'mrp-mo') {
|
||||
include_once DOL_DOCUMENT_ROOT.'/mrp/class/mo.class.php';
|
||||
$object_instance = new Mo($this->db);
|
||||
@ -1717,14 +1723,19 @@ class FormFile
|
||||
$id = (isset($reg[1]) ? $reg[1] : '');
|
||||
} elseif ($modulepart == 'invoice_supplier') {
|
||||
preg_match('/([^\/]+)\/[^\/]+$/', $relativefile, $reg);
|
||||
$ref = (isset($reg[1]) ? $reg[1] : ''); if (is_numeric($ref)) {
|
||||
$ref = (isset($reg[1]) ? $reg[1] : '');
|
||||
if (is_numeric($ref)) {
|
||||
$id = $ref;
|
||||
$ref = '';
|
||||
}
|
||||
} elseif ($modulepart == 'user' || $modulepart == 'holiday') {
|
||||
} elseif ($modulepart == 'user') {
|
||||
// $ref may be also id with old supplier invoices
|
||||
preg_match('/(.*)\/[^\/]+$/', $relativefile, $reg);
|
||||
$id = (isset($reg[1]) ? $reg[1] : '');
|
||||
} elseif ($modulepart == 'project_task') {
|
||||
// $ref of task is the sub-directory of the project
|
||||
$reg = explode("/", $relativefile);
|
||||
$ref = (isset($reg[1]) ? $reg[1] : '');
|
||||
} elseif (in_array($modulepart, array(
|
||||
'invoice',
|
||||
'propal',
|
||||
@ -1734,11 +1745,14 @@ class FormFile
|
||||
'contract',
|
||||
'product',
|
||||
'project',
|
||||
'project_task',
|
||||
'fichinter',
|
||||
'expensereport',
|
||||
'recruitment-recruitmentcandidature',
|
||||
'mrp-mo',
|
||||
'banque'))) {
|
||||
'banque',
|
||||
'chequereceipt',
|
||||
'holiday'))) {
|
||||
preg_match('/(.*)\/[^\/]+$/', $relativefile, $reg);
|
||||
$ref = (isset($reg[1]) ? $reg[1] : '');
|
||||
} else {
|
||||
|
||||
@ -341,6 +341,7 @@ if (!empty($conf->global->ECM_AUTO_TREE_ENABLED)) {
|
||||
}
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
$rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'project', 'test'=>$conf->projet->enabled, 'label'=>$langs->trans("Projects"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Projects")));
|
||||
$rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'project_task', 'test'=>$conf->projet->enabled, 'label'=>$langs->trans("Tasks"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Tasks")));
|
||||
}
|
||||
if (!empty($conf->ficheinter->enabled)) {
|
||||
$langs->load("interventions"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'fichinter', 'test'=>$conf->ficheinter->enabled, 'label'=>$langs->trans("Interventions"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Interventions")));
|
||||
@ -353,6 +354,7 @@ if (!empty($conf->global->ECM_AUTO_TREE_ENABLED)) {
|
||||
}
|
||||
if (!empty($conf->banque->enabled)) {
|
||||
$langs->load("banks"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'banque', 'test'=>$conf->banque->enabled, 'label'=>$langs->trans("BankAccount"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("BankAccount")));
|
||||
$rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'chequereceipt', 'test'=>$conf->banque->enabled, 'label'=>$langs->trans("CheckReceipt"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("CheckReceipt")));
|
||||
}
|
||||
if (!empty($conf->mrp->enabled)) {
|
||||
$langs->load("mrp"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'mrp-mo', 'test'=>$conf->mrp->enabled, 'label'=>$langs->trans("MOs"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ManufacturingOrders")));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user