PR new hook "addMoreActionsButtons" on movement list

This commit is contained in:
Sylvain Legrand 2022-08-14 17:02:35 +02:00
parent 732668a778
commit cf0b54661c

View File

@ -942,12 +942,17 @@ if ($action == "transfert") {
if ((empty($action) || $action == 'list') && $id > 0) {
print "<div class=\"tabsAction\">\n";
if ($user->rights->stock->mouvement->creer) {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&action=correction">'.$langs->trans("CorrectStock").'</a>';
}
$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->stock->mouvement->creer) {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&action=correction">'.$langs->trans("CorrectStock").'</a>';
}
if ($user->rights->stock->mouvement->creer) {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&action=transfert">'.$langs->trans("TransferStock").'</a>';
if ($user->rights->stock->mouvement->creer) {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&action=transfert">'.$langs->trans("TransferStock").'</a>';
}
}
print '</div><br>';