diff --git a/htdocs/workstation/class/workstation.class.php b/htdocs/workstation/class/workstation.class.php index 58f326e3749..cd6b4861e7b 100644 --- a/htdocs/workstation/class/workstation.class.php +++ b/htdocs/workstation/class/workstation.class.php @@ -182,8 +182,6 @@ class Workstation extends CommonObject $this->db = $db; - $this->fields['ref']['default'] = $this->getNextNumRef(); - if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { $this->fields['rowid']['visible'] = 0; } diff --git a/htdocs/workstation/workstation_card.php b/htdocs/workstation/workstation_card.php index 0e16293bd11..19d8a67999c 100644 --- a/htdocs/workstation/workstation_card.php +++ b/htdocs/workstation/workstation_card.php @@ -148,8 +148,6 @@ if (empty($reshook)) { /* * View - * - * Put here all code to build page */ $form = new Form($db); @@ -190,6 +188,9 @@ llxHeader('', $title, $help_url); // Part to create if ($action == 'create') { + // Set default value of the property ref + $object->fields['ref']['default'] = $object->getNextNumRef(); + print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("Workstation")), '', 'object_'.$object->picto); print '