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