31if (((!empty(
$id) &&
$id > 0) || (!empty($ref) && !in_array($action, array(
'create',
'createtask',
'add')))) && (empty($cancel) ||
$id > 0)) {
32 if ((
$id > 0 && is_numeric(
$id)) || !empty($ref)) {
33 if (
$object->element ==
'usergroup') {
34 $ret =
$object->fetch(
$id, (empty($ref) ?
'' : $ref), true);
36 $ret =
$object->fetch(
$id, (empty($ref) ?
'' : $ref));
44 setEventMessages(
'Fetch on object (type '.get_class(
$object).
') return an error without filling $object->error nor $object->errors',
null,
'errors');
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.