diff --git a/htdocs/core/tpl/commonfields_add.tpl.php b/htdocs/core/tpl/commonfields_add.tpl.php index 5e1f02489f9..4c81e50c65c 100644 --- a/htdocs/core/tpl/commonfields_add.tpl.php +++ b/htdocs/core/tpl/commonfields_add.tpl.php @@ -32,6 +32,8 @@ if (empty($conf) || ! is_object($conf)) fields = dol_sort_array($object->fields, 'position'); + foreach($object->fields as $key => $val) { // Discard if extrafield is a hidden field on form diff --git a/htdocs/core/tpl/commonfields_edit.tpl.php b/htdocs/core/tpl/commonfields_edit.tpl.php index fc51a8e1602..8e936ef6b9b 100644 --- a/htdocs/core/tpl/commonfields_edit.tpl.php +++ b/htdocs/core/tpl/commonfields_edit.tpl.php @@ -32,6 +32,8 @@ if (empty($conf) || ! is_object($conf)) fields = dol_sort_array($object->fields, 'position'); + foreach($object->fields as $key => $val) { // Discard if extrafield is a hidden field on form diff --git a/htdocs/core/tpl/commonfields_view.tpl.php b/htdocs/core/tpl/commonfields_view.tpl.php index c297c00b0a8..57023bb63d2 100644 --- a/htdocs/core/tpl/commonfields_view.tpl.php +++ b/htdocs/core/tpl/commonfields_view.tpl.php @@ -34,6 +34,8 @@ if (empty($conf) || ! is_object($conf)) fields = dol_sort_array($object->fields, 'position'); + foreach($object->fields as $key => $val) { // Discard if extrafield is a hidden field on form diff --git a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php index 8a266ba20cf..1d8ba3dace6 100644 --- a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php +++ b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2004-2018 Laurent Destailleur * Copyright (C) ---Put here your own copyright and developer email--- * * This program is free software; you can redistribute it and/or modify @@ -215,7 +215,7 @@ class modMyModule extends DolibarrModules $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used) $this->rights[$r][1] = 'Create/Update myobject of MyModule'; // Permission label $this->rights[$r][3] = 1; // Permission by default for new user (0/1) - $this->rights[$r][4] = 'create'; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2) + $this->rights[$r][4] = 'write'; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2) $this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2) $r++;