Merge pull request #29055 from jyhere/patch-11

FIX: missing executeHooks printFieldListFrom in product list page
This commit is contained in:
Laurent Destailleur 2024-03-25 16:34:21 +01:00 committed by GitHub
commit 41e4d8bf6b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -499,6 +499,11 @@ if (getDolGlobalString('PRODUCT_USE_UNITS')) {
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_units cu ON cu.rowid = p.fk_unit";
}
// Add table from hooks
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint;
$sql .= ' WHERE p.entity IN ('.getEntity('product').')';
if ($sall) {
// Clean $fieldstosearchall