diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index 24596255043..171f4259a36 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -1576,7 +1576,8 @@ elseif (! empty($module)) $pathtosql = strtolower($module).'/sql/llx_'.strtolower($module).'_'.strtolower($tabobj).'.sql'; $pathtosqlextra = strtolower($module).'/sql/llx_'.strtolower($module).'_'.strtolower($tabobj).'_extrafields.sql'; $pathtosqlkey = strtolower($module).'/sql/llx_'.strtolower($module).'_'.strtolower($tabobj).'.key.sql'; - $pathtolib = strtolower($module).'/lib/'.strtolower($tabobj).'.lib.php'; + $pathtolib = strtolower($module).'/lib/'.strtolower($module).'.lib.php'; + $pathtoobjlib = strtolower($module).'/lib/'.strtolower($module).'_'.strtolower($tabobj).'.lib.php'; $pathtopicto = strtolower($module).'/img/object_'.strtolower($tabobj).'.png'; $pathtoscript = strtolower($module).'/scripts/'.strtolower($tabobj).'.php'; @@ -1594,6 +1595,7 @@ elseif (! empty($module)) $realpathtosqlextra = dol_buildpath($pathtosqlextra, 0, 2); $realpathtosqlkey = dol_buildpath($pathtosqlkey, 0, 2); $realpathtolib = dol_buildpath($pathtolib, 0, 2); + $realpathtoobjlib = dol_buildpath($pathtoobjlib, 0, 2); $realpathtopicto = dol_buildpath($pathtopicto, 0, 2); $realpathtoscript = dol_buildpath($pathtoscript, 0, 2); @@ -1614,6 +1616,9 @@ elseif (! empty($module)) print ' '.$langs->trans("PageForLib").' : '.($realpathtolib?'':'').$pathtolib.($realpathtolib?'':'').''; print ' '.img_picto($langs->trans("Edit"), 'edit').''; print '
'; + print ' '.$langs->trans("PageForObjLib").' : '.($realpathtoobjlib?'':'').$pathtoobjlib.($realpathtoobjlib?'':'').''; + print ' '.img_picto($langs->trans("Edit"), 'edit').''; + print '
'; print ' '.$langs->trans("Image").' : '.($realpathtopicto?'':'').$pathtopicto.($realpathtopicto?'':'').''; //print ' '.img_picto($langs->trans("Edit"), 'edit').''; print '
'; diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index 6029fc7d3f9..ad04cc554d3 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -120,15 +120,25 @@ class MyObject extends CommonObject * @var string label */ public $label; - + + /** + * @var string amount + */ public $amount; /** * @var int Status */ public $status; - + + /** + * @var string date_creation + */ public $date_creation; + + /** + * @var string tms + */ public $tms; /** @@ -140,7 +150,10 @@ class MyObject extends CommonObject * @var int ID */ public $fk_user_modif; - + + /** + * @var string import_key + */ public $import_key; // END MODULEBUILDER PROPERTIES diff --git a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php index 8c4f933b31f..5781b93e94d 100644 --- a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php +++ b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php @@ -321,7 +321,7 @@ class modMyModule extends DolibarrModules //$result1=$extrafields->addExtraField('myattr1', "New Attr 1 label", 'boolean', 1, 3, 'thirdparty', 0, 0, '', '', 1, '', 0, 0, '', '', 'mymodule@mymodule', '$conf->mymodule->enabled'); //$result2=$extrafields->addExtraField('myattr2', "New Attr 2 label", 'varchar', 1, 10, 'project', 0, 0, '', '', 1, '', 0, 0, '', '', 'mymodule@mymodule', '$conf->mymodule->enabled'); //$result3=$extrafields->addExtraField('myattr3', "New Attr 3 label", 'varchar', 1, 10, 'bank_account', 0, 0, '', '', 1, '', 0, 0, '', '', 'mymodule@mymodule', '$conf->mymodule->enabled'); - //$result4=$extrafields->addExtraField('myattr4', "New Attr 4 label", 'select', 1, 3, 'thirdparty', 0, 1, '', array('options'=>array('code1'=>'Val1','code2'=>'Val2','code3'=>'Val3')), 1 '', 0, 0, '', '', 'mymodule@mymodule', '$conf->mymodule->enabled'); + //$result4=$extrafields->addExtraField('myattr4', "New Attr 4 label", 'select', 1, 3, 'thirdparty', 0, 1, '', array('options'=>array('code1'=>'Val1','code2'=>'Val2','code3'=>'Val3')), 1,'', 0, 0, '', '', 'mymodule@mymodule', '$conf->mymodule->enabled'); //$result5=$extrafields->addExtraField('myattr5', "New Attr 5 label", 'text', 1, 10, 'user', 0, 0, '', '', 1, '', 0, 0, '', '', 'mymodule@mymodule', '$conf->mymodule->enabled'); $sql = array();