Merge pull request #22869 from Easya-Solutions/new-contact-list-hook-print-field-list-from
NEW hook printFieldListFrom in contact list
This commit is contained in:
commit
d195c832d8
@ -410,6 +410,10 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_stcommcontact as st ON st.id = p.fk_stco
|
||||
if (empty($user->rights->societe->client->voir) && !$socid) {
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc";
|
||||
}
|
||||
// Add fields 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('contact').')';
|
||||
if (empty($user->rights->societe->client->voir) && !$socid) { //restriction
|
||||
$sql .= " AND (sc.fk_user = ".((int) $user->id)." OR p.fk_soc IS NULL)";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user