diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php index 78a9070eefd..6c6324e6e8d 100644 --- a/htdocs/modulebuilder/template/myobject_card.php +++ b/htdocs/modulebuilder/template/myobject_card.php @@ -80,7 +80,7 @@ $extrafields = new ExtraFields($db); $diroutputmassaction=$conf->mymodule->dir_output . '/temp/massgeneration/'.$user->id; $hookmanager->initHooks(array('myobjectcard','globalcard')); // Note that conf->hooks_modules contains array // Fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('myobject'); +$extralabels = $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search_'); // Initialize array of search criterias @@ -98,9 +98,6 @@ if (empty($action) && empty($id) && empty($ref)) $action='view'; //if ($user->societe_id > 0) $socid = $user->societe_id; //$result = restrictedArea($user, 'mymodule', $id); -// fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label($object->table_element); - // Load object include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals