Debug v17 - Fix table access in workstation constructor
This commit is contained in:
parent
99e2df5a27
commit
97f73d74ac
@ -182,8 +182,6 @@ class Workstation extends CommonObject
|
|||||||
|
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
|
|
||||||
$this->fields['ref']['default'] = $this->getNextNumRef();
|
|
||||||
|
|
||||||
if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) {
|
if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) {
|
||||||
$this->fields['rowid']['visible'] = 0;
|
$this->fields['rowid']['visible'] = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -148,8 +148,6 @@ if (empty($reshook)) {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*
|
|
||||||
* Put here all code to build page
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
@ -190,6 +188,9 @@ llxHeader('', $title, $help_url);
|
|||||||
|
|
||||||
// Part to create
|
// Part to create
|
||||||
if ($action == '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 load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("Workstation")), '', 'object_'.$object->picto);
|
||||||
|
|
||||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user