Merge pull request #8375 from atm-quentin/6.0

FIX reverse field to have object loaded in doaction
This commit is contained in:
Laurent Destailleur
2018-03-13 17:56:06 +01:00
committed by GitHub

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'));