Add hook on comm/fiche.php to manage doAction and buttons

This commit is contained in:
Florian HENRY 2014-05-07 17:23:38 +02:00
parent 45e134bfef
commit 50a6cac094

View File

@ -67,12 +67,19 @@ $pagenext = $page + 1;
if (! $sortorder) $sortorder="ASC";
if (! $sortfield) $sortfield="nom";
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array('commcard'));
$object = new Societe($db);
/*
* Actions
*/
$parameters = array('socid' => $id);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some
if ($action == 'setcustomeraccountancycode')
{
$result=$object->fetch($id);
@ -814,6 +821,11 @@ if ($id > 0)
/*
* Barre d'actions
*/
$parameters = array();
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been
print '<div class="tabsAction">';
if (! empty($conf->propal->enabled) && $user->rights->propal->creer)