Fix missing hook

This commit is contained in:
Laurent Destailleur 2026-04-26 20:35:24 +02:00
parent 383a7a2ef4
commit 8a38e805e3
2 changed files with 8 additions and 0 deletions

View file

@ -346,6 +346,10 @@ foreach ($object->fields as $key => $val) {
}
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
// Add hook to complete $arrayfield
$parameters = array('arrayfields' => &$arrayfields);
$reshook = $hookmanager->executeHooks('completeArrayFields', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint;
// For POS context, we force some fields
if ($contextpage == 'poslist') {

View file

@ -195,6 +195,10 @@ foreach ($object->fields as $key => $val) {
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
// Add hook to complete $arrayfield
$parameters = array('arrayfields' => &$arrayfields);
$reshook = $hookmanager->executeHooks('completeArrayFields', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint;
// Complete arrayfields with special fields
/*$arrayfields = array_merge($arrayfields, array(