diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 9b89a1bfc09..d08d230b3bd 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -6034,7 +6034,7 @@ class Form
}
else
{
- $fieldstoshow = 't.ref'; // Keep compatibility with old object not declare yet fields
+ $objecttmp->fields['ref']=array('type'=>'varchar(30)', 'label'=>'Ref');
}
if (empty($fieldstoshow))