Debug v17 - Fix table access in workstation constructor

This commit is contained in:
Laurent Destailleur 2023-04-08 12:32:00 +02:00
parent 99e2df5a27
commit 97f73d74ac
2 changed files with 3 additions and 4 deletions

View File

@ -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;
}

View File

@ -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 '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';