adding hook for more action buttons

allow additionnal hook action (like myField)
This commit is contained in:
BENKE Charlie 2015-05-26 15:00:23 +02:00
parent 06faf762d4
commit d16bfcc294

View File

@ -501,6 +501,10 @@ if ($id || $ref)
print "\n<div class=\"tabsAction\">\n"; print "\n<div class=\"tabsAction\">\n";
if ($action != 'add_price' && $action != 'updateprice') if ($action != 'add_price' && $action != 'updateprice')
{
$parameters=array();
$reshook=$hookmanager->executeHooks('addMoreActionsButtons',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
if (empty($reshook))
{ {
if ($user->rights->produit->creer || $user->rights->service->creer) if ($user->rights->produit->creer || $user->rights->service->creer)
{ {
@ -508,6 +512,7 @@ if ($id || $ref)
print $langs->trans("AddSupplierPrice").'</a>'; print $langs->trans("AddSupplierPrice").'</a>';
} }
} }
}
print "\n</div>\n"; print "\n</div>\n";
print '<br>'; print '<br>';