Merge pull request #2908 from defrance69/patch-63

NEW Add hook for more action buttons on product supplier page
This commit is contained in:
Laurent Destailleur 2015-05-30 14:59:58 +02:00
commit 920dc80dd6

View File

@ -502,10 +502,15 @@ if ($id || $ref)
if ($action != 'add_price' && $action != 'updateprice')
{
if ($user->rights->produit->creer || $user->rights->service->creer)
$parameters=array();
$reshook=$hookmanager->executeHooks('addMoreActionsButtons',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
if (empty($reshook))
{
print '<a class="butAction" href="'.DOL_URL_ROOT.'/product/fournisseurs.php?id='.$product->id.'&amp;action=add_price">';
print $langs->trans("AddSupplierPrice").'</a>';
if ($user->rights->produit->creer || $user->rights->service->creer)
{
print '<a class="butAction" href="'.DOL_URL_ROOT.'/product/fournisseurs.php?id='.$product->id.'&amp;action=add_price">';
print $langs->trans("AddSupplierPrice").'</a>';
}
}
}