FIX reverse field to have object loaded in doaction

This commit is contained in:
atm-quentin 2018-03-13 17:12:03 +01:00
parent f82bedb36c
commit af09a3714b

View File

@ -73,7 +73,7 @@ $extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('thirdpartycard','globalcard'));
if ($action == 'view' && $object->fetch($socid)<=0)
if ($object->fetch($socid)<=0 && $action == 'view')
{
$langs->load("errors");
print($langs->trans('ErrorRecordNotFound'));