31 if (($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 $ret = $object->fetch($id, (empty($ref)?
'' : $ref));
35 $object->fetch_thirdparty();
38 if (empty($object->error) && !count($object->errors)) {
40 setEventMessages(
'Fetch on object (type '.get_class($object).
') return an error without filling $object->error nor $object->errors',
null,
'errors');
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.