Merge pull request #17540 from ibuiv/ibuiv-supplierorder-hooks

New Hooks for Supplier Order Card tabs
This commit is contained in:
Laurent Destailleur 2021-05-11 19:12:24 +02:00 committed by GitHub
commit e3cb04e235
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 0 deletions

View File

@ -45,6 +45,7 @@ if ($user->socid) {
$socid = $user->socid;
}
$result = restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'commande');
$hookmanager->initHooks(array('ordersuppliercardcontact'));
$object = new CommandeFournisseur($db);

View File

@ -70,6 +70,7 @@ if (!$sortfield) {
$sortfield = "name";
}
$hookmanager->initHooks(array('ordersuppliercarddocument'));
$object = new CommandeFournisseur($db);
if ($object->fetch($id, $ref) < 0) {

View File

@ -78,6 +78,7 @@ if (!$user->rights->fournisseur->commande->lire) {
accessforbidden();
}
$hookmanager->initHooks(array('ordersuppliercardinfo'));

View File

@ -48,6 +48,8 @@ $result = restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'com
$object = new CommandeFournisseur($db);
$object->fetch($id, $ref);
$hookmanager->initHooks(array('ordersuppliercardnote'));
$permissionnote = ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer); // Used by the include of actions_setnotes.inc.php