Merge pull request #21759 from SylvainLegrand/PR_new_hook_on_movement_list

PR new hook "addMoreActionsButtons" on movement list
This commit is contained in:
Laurent Destailleur 2022-08-16 19:55:50 +02:00 committed by GitHub
commit 9ac38f25a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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>';