Work on module builder
This commit is contained in:
parent
a630e665d9
commit
533979987f
@ -39,7 +39,7 @@ class MyObject extends CommonObject
|
||||
/**
|
||||
* @var string Name of table without prefix where object is stored
|
||||
*/
|
||||
public $table_element = 'myobject';
|
||||
public $table_element = 'mymodule_myobject';
|
||||
/**
|
||||
* @var array Does myobject support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
*/
|
||||
|
||||
@ -211,7 +211,7 @@ $parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
$sql.=$hookmanager->resPrint;
|
||||
$sql=preg_replace('/, $/','', $sql);
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."myobject as t";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t";
|
||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."myobject_extrafields as ef on (t.rowid = ef.fk_object)";
|
||||
if ($object->ismultientitymanaged == 1) $sql.= " WHERE t.entity IN (".getEntity('myobject').")";
|
||||
else $sql.=" WHERE 1 = 1";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user