Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2024-08-31 14:03:51 +02:00
commit 558dbbe1df

View file

@ -317,6 +317,13 @@ if ((isModEnabled("product") || isModEnabled("service")) && ($user->hasRight("pr
/*if ($type != '') {
$sql .= " AND p.fk_product_type = ".((int) $type);
}*/
if (!$user->hasRight("produit", "lire")) {
$sql .= " AND p.fk_product_type <> ".((int) Product::TYPE_PRODUCT);
}
if (!$user->hasRight("service", "lire")) {
$sql .= " AND p.fk_product_type <> ".((int) Product::TYPE_SERVICE);
}
// Add where from hooks
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $product_static); // Note that $action and $object may have been modified by hook