diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 1c8b51fc0f1..f5fcc56b49d 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -1449,10 +1449,9 @@ while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); $parameters = array('staticdata' => $obj); // Note that $action and $object may have been modified by hook + // do companystatic fetch in hook if wanted or anything else $reshook = $hookmanager->executeHooks('loadStaticObject', $parameters, $companystatic, $action); - if ($reshook < 0) { - $companystatic->fetch($obj->rowid); - } else { + if (empty($reshook)) { $companystatic->id = $obj->rowid; $companystatic->name = $obj->name; $companystatic->name_alias = $obj->name_alias;