|
@@ -6284,11 +6284,12 @@ abstract class CommonObject
|
|
if (is_array($params) && array_key_exists('onlykey',$params) && $key != $params['onlykey']) continue;
|
|
if (is_array($params) && array_key_exists('onlykey',$params) && $key != $params['onlykey']) continue;
|
|
|
|
|
|
// @TODO Add test also on 'enabled' (different than 'list' that is 'visibility')
|
|
// @TODO Add test also on 'enabled' (different than 'list' that is 'visibility')
|
|
-
|
|
|
|
$enabled = 1;
|
|
$enabled = 1;
|
|
- if ($enabled && isset($extrafields->attributes[$this->table_element]['list'][$key]))
|
|
|
|
|
|
+
|
|
|
|
+ $visibility = 1;
|
|
|
|
+ if ($visibility && isset($extrafields->attributes[$this->table_element]['list'][$key]))
|
|
{
|
|
{
|
|
- $enabled = dol_eval($extrafields->attributes[$this->table_element]['list'][$key], 1);
|
|
|
|
|
|
+ $visibility = dol_eval($extrafields->attributes[$this->table_element]['list'][$key], 1);
|
|
}
|
|
}
|
|
|
|
|
|
$perms = 1;
|
|
$perms = 1;
|
|
@@ -6297,7 +6298,7 @@ abstract class CommonObject
|
|
$perms = dol_eval($extrafields->attributes[$this->table_element]['perms'][$key], 1);
|
|
$perms = dol_eval($extrafields->attributes[$this->table_element]['perms'][$key], 1);
|
|
}
|
|
}
|
|
|
|
|
|
- if (($mode == 'create' || $mode == 'edit') && abs($enabled) != 1 && abs($enabled) != 3) continue; // <> -1 and <> 1 and <> 3 = not visible on forms, only on list
|
|
|
|
|
|
+ if (($mode == 'create' || $mode == 'edit') && abs($visibility) != 1 && abs($visibility) != 3) continue; // <> -1 and <> 1 and <> 3 = not visible on forms, only on list
|
|
if (empty($perms)) continue;
|
|
if (empty($perms)) continue;
|
|
|
|
|
|
// Load language if required
|
|
// Load language if required
|