Merge pull request #15678 from frederic34/fk_element

doxygen
This commit is contained in:
Laurent Destailleur 2020-12-07 22:31:08 +01:00 committed by GitHub
commit efc3bad7c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
44 changed files with 193 additions and 316 deletions

View File

@ -37,7 +37,7 @@ class AccountingJournal extends CommonObject
public $table_element = 'accounting_journal'; public $table_element = 'accounting_journal';
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Fieldname with ID of parent key if this field has a parent
*/ */
public $fk_element = ''; public $fk_element = '';

View File

@ -158,28 +158,6 @@ class Asset extends CommonObject
*/ */
public $status; public $status;
// If this object has a subtable with lines
/**
* @var int Name of subtable line
*/
//public $table_element_line = 'assetdet';
/**
* @var int Field with ID of parent key if this field has a parent
*/
//public $fk_element = 'fk_asset';
/**
* @var int Name of subtable class that manage subtable lines
*/
//public $class_element_line = 'Assetline';
/**
* @var array List of child tables. To test if we can delete object.
*/
//protected $childtables=array();
/**
* @var AssetLine[] Array of subtable lines
*/
//public $lines = array();
/** /**
* Constructor * Constructor

View File

@ -183,18 +183,18 @@ class BOM extends CommonObject
public $table_element_line = 'bom_bomline'; public $table_element_line = 'bom_bomline';
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Fieldname with ID of parent key if this field has a parent
*/ */
public $fk_element = 'fk_bom'; public $fk_element = 'fk_bom';
/** /**
* @var int Name of subtable class that manage subtable lines * @var string Name of subtable class that manage subtable lines
*/ */
public $class_element_line = 'BOMLine'; public $class_element_line = 'BOMLine';
/** // /**
* @var array List of child tables. To test if we can delete object. // * @var array List of child tables. To test if we can delete object.
*/ // */
// protected $childtables=array(); // protected $childtables=array();
/** /**

View File

@ -54,7 +54,7 @@ class AdvanceTargetingMailing extends CommonObject
public $name; public $name;
/** /**
* @var int element id * @var int element id (it's not the name of a field)
*/ */
public $fk_element; public $fk_element;

View File

@ -66,7 +66,7 @@ class Propal extends CommonObject
public $table_element_line = 'propaldet'; public $table_element_line = 'propaldet';
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Fieldname with ID of parent key if this field has a parent
*/ */
public $fk_element = 'fk_propal'; public $fk_element = 'fk_propal';

View File

@ -43,12 +43,12 @@ class Deplacement extends CommonObject
public $table_element = 'deplacement'; public $table_element = 'deplacement';
/** /**
* @var int Name of subtable line * @var string Name of subtable line
*/ */
public $table_element_line = ''; public $table_element_line = '';
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Fieldname with ID of parent key if this field has a parent
*/ */
public $fk_element = ''; public $fk_element = '';

View File

@ -50,12 +50,12 @@ class FactureRec extends CommonInvoice
public $table_element = 'facture_rec'; public $table_element = 'facture_rec';
/** /**
* @var int Name of subtable line * @var string Name of subtable line
*/ */
public $table_element_line = 'facturedet_rec'; public $table_element_line = 'facturedet_rec';
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Field with ID of parent key if this field has a parent
*/ */
public $fk_element = 'fk_facture'; public $fk_element = 'fk_facture';

View File

@ -64,12 +64,12 @@ class Facture extends CommonInvoice
public $table_element = 'facture'; public $table_element = 'facture';
/** /**
* @var int Name of subtable line * @var string Name of subtable line
*/ */
public $table_element_line = 'facturedet'; public $table_element_line = 'facturedet';
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Fieldname with ID of parent key if this field has a parent
*/ */
public $fk_element = 'fk_facture'; public $fk_element = 'fk_facture';

View File

@ -53,12 +53,12 @@ class Contrat extends CommonObject
public $table_element = 'contrat'; public $table_element = 'contrat';
/** /**
* @var int Name of subtable line * @var string Name of subtable line
*/ */
public $table_element_line = 'contratdet'; public $table_element_line = 'contratdet';
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Fieldname with ID of parent key if this field has a parent
*/ */
public $fk_element = 'fk_contrat'; public $fk_element = 'fk_contrat';

View File

@ -32,10 +32,13 @@ class Comment extends CommonObject
public $table_element = 'comment'; public $table_element = 'comment';
/** /**
* @var int Field with ID of parent key if this field has a parent * @var int ID of parent key (it's not the name of a field)
*/ */
public $fk_element = ''; public $fk_element;
/**
* @var string element type
*/
public $element_type; public $element_type;
/** /**
@ -72,10 +75,16 @@ class Comment extends CommonObject
*/ */
public $entity; public $entity;
/**
* @var string import key
*/
public $import_key; public $import_key;
public $comments = array(); public $comments = array();
/**
* @var Comment Object oldcopy
*/
public $oldcopy; public $oldcopy;
@ -131,26 +140,26 @@ class Comment extends CommonObject
dol_syslog(get_class($this)."::create", LOG_DEBUG); dol_syslog(get_class($this)."::create", LOG_DEBUG);
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } if (!$resql) {
$error++; $this->errors[] = "Error ".$this->db->lasterror();
}
if (!$error) if (!$error) {
{
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element); $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element);
if (!$notrigger) if (!$notrigger) {
{
// Call trigger // Call trigger
$result = $this->call_trigger('TASK_COMMENT_CREATE', $user); $result = $this->call_trigger('TASK_COMMENT_CREATE', $user);
if ($result < 0) { $error++; } if ($result < 0) {
$error++;
}
// End call triggers // End call triggers
} }
} }
// Commit or rollback // Commit or rollback
if ($error) if ($error) {
{ foreach ($this->errors as $errmsg) {
foreach ($this->errors as $errmsg)
{
dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR); dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR);
$this->error .= ($this->error ? ', '.$errmsg : $errmsg); $this->error .= ($this->error ? ', '.$errmsg : $errmsg);
} }
@ -190,12 +199,10 @@ class Comment extends CommonObject
dol_syslog(get_class($this)."::fetch", LOG_DEBUG); dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if ($resql) if ($resql) {
{
$num_rows = $this->db->num_rows($resql); $num_rows = $this->db->num_rows($resql);
if ($num_rows) if ($num_rows) {
{
$obj = $this->db->fetch_object($resql); $obj = $this->db->fetch_object($resql);
$this->id = $obj->rowid; $this->id = $obj->rowid;
@ -212,8 +219,11 @@ class Comment extends CommonObject
$this->db->free($resql); $this->db->free($resql);
if ($num_rows) return 1; if ($num_rows) {
else return 0; return 1;
} else {
return 0;
}
} else { } else {
$this->error = "Error ".$this->db->lasterror(); $this->error = "Error ".$this->db->lasterror();
return -1; return -1;
@ -234,8 +244,12 @@ class Comment extends CommonObject
$error = 0; $error = 0;
// Clean parameters // Clean parameters
if (isset($this->fk_element)) $this->fk_project = (int) trim($this->fk_element); if (isset($this->fk_element)) {
if (isset($this->description)) $this->description = trim($this->description); $this->fk_project = (int) trim($this->fk_element);
}
if (isset($this->description)) {
$this->description = trim($this->description);
}
// Update request // Update request
@ -253,24 +267,24 @@ class Comment extends CommonObject
dol_syslog(get_class($this)."::update", LOG_DEBUG); dol_syslog(get_class($this)."::update", LOG_DEBUG);
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } if (!$resql) {
$error++; $this->errors[] = "Error ".$this->db->lasterror();
}
if (!$error) if (!$error) {
{ if (!$notrigger) {
if (!$notrigger)
{
// Call trigger // Call trigger
$result = $this->call_trigger('TASK_COMMENT_MODIFY', $user); $result = $this->call_trigger('TASK_COMMENT_MODIFY', $user);
if ($result < 0) { $error++; } if ($result < 0) {
$error++;
}
// End call triggers // End call triggers
} }
} }
// Commit or rollback // Commit or rollback
if ($error) if ($error) {
{ foreach ($this->errors as $errmsg) {
foreach ($this->errors as $errmsg)
{
dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR);
$this->error .= ($this->error ? ', '.$errmsg : $errmsg); $this->error .= ($this->error ? ', '.$errmsg : $errmsg);
} }
@ -303,24 +317,24 @@ class Comment extends CommonObject
$sql .= " WHERE rowid=".$this->id; $sql .= " WHERE rowid=".$this->id;
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } if (!$resql) {
$error++; $this->errors[] = "Error ".$this->db->lasterror();
}
if (!$error) if (!$error) {
{ if (!$notrigger) {
if (!$notrigger)
{
// Call trigger // Call trigger
$result = $this->call_trigger('TASK_COMMENT_DELETE', $user); $result = $this->call_trigger('TASK_COMMENT_DELETE', $user);
if ($result < 0) { $error++; } if ($result < 0) {
$error++;
}
// End call triggers // End call triggers
} }
} }
// Commit or rollback // Commit or rollback
if ($error) if ($error) {
{ foreach ($this->errors as $errmsg) {
foreach ($this->errors as $errmsg)
{
dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR);
$this->error .= ($this->error ? ', '.$errmsg : $errmsg); $this->error .= ($this->error ? ', '.$errmsg : $errmsg);
} }
@ -355,13 +369,10 @@ class Comment extends CommonObject
dol_syslog(get_class($this).'::'.__METHOD__, LOG_DEBUG); dol_syslog(get_class($this).'::'.__METHOD__, LOG_DEBUG);
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if ($resql) if ($resql) {
{
$num_rows = $this->db->num_rows($resql); $num_rows = $this->db->num_rows($resql);
if ($num_rows > 0) if ($num_rows > 0) {
{ while ($obj = $this->db->fetch_object($resql)) {
while ($obj = $this->db->fetch_object($resql))
{
$comment = new self($db); $comment = new self($db);
$comment->fetch($obj->rowid); $comment->fetch($obj->rowid);
$this->comments[] = $comment; $this->comments[] = $comment;

View File

@ -125,7 +125,6 @@ class EmailSenderProfile extends CommonObject
*/ */
public $date_creation; public $date_creation;
public $tms; public $tms;
public $private; public $private;
public $signature; public $signature;
@ -134,32 +133,6 @@ class EmailSenderProfile extends CommonObject
// END MODULEBUILDER PROPERTIES // END MODULEBUILDER PROPERTIES
// If this object has a subtable with lines
/**
* @var int Name of subtable line
*/
//public $table_element_line = 'emailsenderprofiledet';
/**
* @var int Field with ID of parent key if this field has a parent
*/
//public $fk_element = 'fk_emailsenderprofile';
/**
* @var int Name of subtable class that manage subtable lines
*/
//public $class_element_line = 'EmailSenderProfileline';
/**
* @var array List of child tables. To test if we can delete object.
*/
//protected $childtables=array();
/**
* @var EmailSenderProfileLine[] Array of subtable lines
*/
//public $lines = array();
/** /**
* Constructor * Constructor
* *

View File

@ -35,6 +35,9 @@ class Fiscalyear extends CommonObject
*/ */
public $element = 'fiscalyear'; public $element = 'fiscalyear';
/**
* @var string picto
*/
public $picto = 'technic'; public $picto = 'technic';
/** /**
@ -43,12 +46,12 @@ class Fiscalyear extends CommonObject
public $table_element = 'accounting_fiscalyear'; public $table_element = 'accounting_fiscalyear';
/** /**
* @var int Name of subtable line * @var string Name of subtable line
*/ */
public $table_element_line = ''; public $table_element_line = '';
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Field with ID of parent key if this field has a parent
*/ */
public $fk_element = ''; public $fk_element = '';

View File

@ -48,7 +48,7 @@ class Delivery extends CommonObject
public $element = "delivery"; public $element = "delivery";
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Field with ID of parent key if this field has a parent
*/ */
public $fk_element = "fk_delivery"; public $fk_element = "fk_delivery";
@ -58,7 +58,7 @@ class Delivery extends CommonObject
public $table_element = "delivery"; public $table_element = "delivery";
/** /**
* @var int Name of subtable line * @var string Name of subtable line
*/ */
public $table_element_line = "deliverydet"; public $table_element_line = "deliverydet";

View File

@ -47,7 +47,7 @@ class Don extends CommonObject
public $table_element = 'don'; public $table_element = 'don';
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Field with ID of parent key if this field has a parent
*/ */
public $fk_element = 'fk_donation'; public $fk_element = 'fk_donation';

View File

@ -52,13 +52,14 @@ class EmailCollector extends CommonObject
* @var int Does emailcollector support extrafields ? 0=No, 1=Yes * @var int Does emailcollector support extrafields ? 0=No, 1=Yes
*/ */
public $isextrafieldmanaged = 0; public $isextrafieldmanaged = 0;
/** /**
* @var string String with name of icon for emailcollector. Must be the part after the 'object_' into object_emailcollector.png * @var string String with name of icon for emailcollector. Must be the part after the 'object_' into object_emailcollector.png
*/ */
public $picto = 'generic'; public $picto = 'generic';
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Field with ID of parent key if this field has a parent
*/ */
public $fk_element = 'fk_emailcollector'; public $fk_element = 'fk_emailcollector';
@ -158,7 +159,9 @@ class EmailCollector extends CommonObject
*/ */
public $date_creation; public $date_creation;
/**
* @var int timestamp
*/
public $tms; public $tms;
/** /**
@ -171,6 +174,9 @@ class EmailCollector extends CommonObject
*/ */
public $fk_user_modif; public $fk_user_modif;
/**
* @var string import key
*/
public $import_key; public $import_key;

View File

@ -118,17 +118,17 @@ class EmailCollectorAction extends CommonObject
// If this object has a subtable with lines // If this object has a subtable with lines
// /** // /**
// * @var int Name of subtable line // * @var string Name of subtable line
// */ // */
//public $table_element_line = 'emailcollectoractiondet'; //public $table_element_line = 'emailcollectoractiondet';
// /** // /**
// * @var int Field with ID of parent key if this field has a parent // * @var string Field with ID of parent key if this field has a parent
// */ // */
//public $fk_element = 'fk_emailcollectoraction'; //public $fk_element = 'fk_emailcollectoraction';
// /** // /**
// * @var int Name of subtable class that manage subtable lines // * @var string Name of subtable class that manage subtable lines
// */ // */
//public $class_element_line = 'EmailcollectorActionline'; //public $class_element_line = 'EmailcollectorActionline';

View File

@ -55,7 +55,7 @@ class Expedition extends CommonObject
public $element = "shipping"; public $element = "shipping";
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Field with ID of parent key if this field has a parent
*/ */
public $fk_element = "fk_expedition"; public $fk_element = "fk_expedition";
@ -65,7 +65,7 @@ class Expedition extends CommonObject
public $table_element = "expedition"; public $table_element = "expedition";
/** /**
* @var int Name of subtable line * @var string Name of subtable line
*/ */
public $table_element_line = "expeditiondet"; public $table_element_line = "expeditiondet";

View File

@ -44,7 +44,14 @@ class ExpenseReport extends CommonObject
*/ */
public $table_element = 'expensereport'; public $table_element = 'expensereport';
/**
* @var string table element line name
*/
public $table_element_line = 'expensereport_det'; public $table_element_line = 'expensereport_det';
/**
* @var string Fieldname with ID of parent key if this field has a parent
*/
public $fk_element = 'fk_expensereport'; public $fk_element = 'fk_expensereport';
/** /**

View File

@ -40,7 +40,7 @@ class ExpenseReportIk extends CoreObject
public $table_element = 'expensereport_ik'; public $table_element = 'expensereport_ik';
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Field with ID of parent key if this field has a parent
*/ */
public $fk_element = 'fk_expense_ik'; public $fk_element = 'fk_expense_ik';

View File

@ -40,7 +40,7 @@ class ExpenseReportRule extends CoreObject
public $table_element = 'expensereport_rules'; public $table_element = 'expensereport_rules';
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Fieldname with ID of parent key if this field has a parent
*/ */
public $fk_element = 'fk_expense_rule'; public $fk_element = 'fk_expense_rule';

View File

@ -76,7 +76,7 @@ class Fichinter extends CommonObject
public $table_element = 'fichinter'; public $table_element = 'fichinter';
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Field with ID of parent key if this field has a parent
*/ */
public $fk_element = 'fk_fichinter'; public $fk_element = 'fk_fichinter';
@ -1435,7 +1435,7 @@ class FichinterLigne extends CommonObjectLine
public $table_element = 'fichinterdet'; public $table_element = 'fichinterdet';
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Field with ID of parent key if this field has a parent
*/ */
public $fk_element = 'fk_fichinter'; public $fk_element = 'fk_fichinter';

View File

@ -41,6 +41,10 @@ class FichinterRec extends Fichinter
public $element = 'fichinterrec'; public $element = 'fichinterrec';
public $table_element = 'fichinter_rec'; public $table_element = 'fichinter_rec';
public $table_element_line = 'fichinter_rec'; public $table_element_line = 'fichinter_rec';
/**
* @var string Fieldname with ID of parent key if this field has a parent
*/
public $fk_element = 'fk_fichinter'; public $fk_element = 'fk_fichinter';
/** /**

View File

@ -53,12 +53,12 @@ class CommandeFournisseur extends CommonOrder
public $table_element = 'commande_fournisseur'; public $table_element = 'commande_fournisseur';
/** /**
* @var int Name of subtable line * @var string Name of subtable line
*/ */
public $table_element_line = 'commande_fournisseurdet'; public $table_element_line = 'commande_fournisseurdet';
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Field with ID of parent key if this field has a parent
*/ */
public $fk_element = 'fk_commande'; public $fk_element = 'fk_commande';

View File

@ -57,12 +57,12 @@ class FactureFournisseur extends CommonInvoice
public $table_element = 'facture_fourn'; public $table_element = 'facture_fourn';
/** /**
* @var int Name of subtable line * @var string Name of subtable line
*/ */
public $table_element_line = 'facture_fourn_det'; public $table_element_line = 'facture_fourn_det';
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Field with ID of parent key if this field has a parent
*/ */
public $fk_element = 'fk_facture_fourn'; public $fk_element = 'fk_facture_fourn';

View File

@ -50,7 +50,7 @@ class Holiday extends CommonObject
public $ismultientitymanaged = 0; public $ismultientitymanaged = 0;
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Field with ID of parent key if this field has a parent
*/ */
public $fk_element = 'fk_holiday'; public $fk_element = 'fk_holiday';

View File

@ -40,12 +40,12 @@ class Establishment extends CommonObject
public $table_element = 'establishment'; public $table_element = 'establishment';
/** /**
* @var int Name of subtable line * @var string Name of subtable line
*/ */
public $table_element_line = ''; public $table_element_line = '';
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Field with ID of parent key if this field has a parent
*/ */
public $fk_element = 'fk_establishment'; public $fk_element = 'fk_establishment';

View File

@ -40,7 +40,7 @@ class IntracommReport extends CommonObject
public $table_element = 'intracommreport'; public $table_element = 'intracommreport';
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Field with ID of parent key if this field has a parent
*/ */
public $fk_element = 'fk_intracommreport'; public $fk_element = 'fk_intracommreport';

View File

@ -187,36 +187,36 @@ class MyObject extends CommonObject
// If this object has a subtable with lines // If this object has a subtable with lines
/** // /**
* @var int Name of subtable line // * @var string Name of subtable line
*/ // */
// public $table_element_line = 'mymodule_myobjectline'; // public $table_element_line = 'mymodule_myobjectline';
/** // /**
* @var int Field with ID of parent key if this object has a parent // * @var string Field with ID of parent key if this object has a parent
*/ // */
// public $fk_element = 'fk_myobject'; // public $fk_element = 'fk_myobject';
/** // /**
* @var int Name of subtable class that manage subtable lines // * @var string Name of subtable class that manage subtable lines
*/ // */
// public $class_element_line = 'MyObjectline'; // public $class_element_line = 'MyObjectline';
/** // /**
* @var array List of child tables. To test if we can delete object. // * @var array List of child tables. To test if we can delete object.
*/ // */
// protected $childtables = array(); // protected $childtables = array();
/** // /**
* @var array List of child tables. To know object to delete on cascade. // * @var array List of child tables. To know object to delete on cascade.
* If name matches '@ClassNAme:FilePathClass;ParentFkFieldName' it will // * If name matches '@ClassNAme:FilePathClass;ParentFkFieldName' it will
* call method deleteByParentField(parentId, ParentFkFieldName) to fetch and delete child object // * call method deleteByParentField(parentId, ParentFkFieldName) to fetch and delete child object
*/ // */
// protected $childtablesoncascade = array('mymodule_myobjectdet'); // protected $childtablesoncascade = array('mymodule_myobjectdet');
/** // /**
* @var MyObjectLine[] Array of subtable lines // * @var MyObjectLine[] Array of subtable lines
*/ // */
// public $lines = array(); // public $lines = array();

View File

@ -166,17 +166,17 @@ class Mo extends CommonObject
// If this object has a subtable with lines // If this object has a subtable with lines
/** /**
* @var int Name of subtable line * @var string Name of subtable line
*/ */
public $table_element_line = 'mo_production'; public $table_element_line = 'mo_production';
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Field with ID of parent key if this field has a parent
*/ */
public $fk_element = 'fk_mo'; public $fk_element = 'fk_mo';
/** /**
* @var int Name of subtable class that manage subtable lines * @var string Name of subtable class that manage subtable lines
*/ */
public $class_element_line = 'MoLine'; public $class_element_line = 'MoLine';

View File

@ -56,14 +56,22 @@ class Product extends CommonObject
public $table_element = 'product'; public $table_element = 'product';
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Field with ID of parent key if this field has a parent
*/ */
public $fk_element = 'fk_product'; public $fk_element = 'fk_product';
/** /**
* @var array List of child tables. To test if we can delete object. * @var array List of child tables. To test if we can delete object.
*/ */
protected $childtables = array('supplier_proposaldet', 'propaldet', 'commandedet', 'facturedet', 'contratdet', 'facture_fourn_det', 'commande_fournisseurdet'); protected $childtables = array(
'supplier_proposaldet',
'propaldet',
'commandedet',
'facturedet',
'contratdet',
'facture_fourn_det',
'commande_fournisseurdet'
);
/** /**
* 0=No test on entity, 1=Test with field entity, 2=Test with link by societe * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe

View File

@ -170,6 +170,9 @@ class Inventory extends CommonObject
*/ */
public $fk_user_valid; public $fk_user_valid;
/**
* @var string import key
*/
public $import_key; public $import_key;
// END MODULEBUILDER PROPERTIES // END MODULEBUILDER PROPERTIES
@ -178,17 +181,17 @@ class Inventory extends CommonObject
// If this object has a subtable with lines // If this object has a subtable with lines
/** /**
* @var int Name of subtable line * @var string Name of subtable line
*/ */
public $table_element_line = 'inventorydet'; public $table_element_line = 'inventorydet';
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Field with ID of parent key if this field has a parent
*/ */
public $fk_element = 'fk_inventory'; public $fk_element = 'fk_inventory';
/** /**
* @var int Name of subtable class that manage subtable lines * @var string Name of subtable class that manage subtable lines
*/ */
public $class_element_line = 'Inventoryline'; public $class_element_line = 'Inventoryline';

View File

@ -45,17 +45,17 @@ class Project extends CommonObject
public $table_element = 'projet'; public $table_element = 'projet';
/** /**
* @var int Name of subtable line * @var string Name of subtable line
*/ */
public $table_element_line = 'projet_task'; public $table_element_line = 'projet_task';
/** /**
* @var int Name of field date * @var string Name of field date
*/ */
public $table_element_date; public $table_element_date;
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Field with ID of parent key if this field has a parent
*/ */
public $fk_element = 'fk_projet'; public $fk_element = 'fk_projet';

View File

@ -45,7 +45,7 @@ class Task extends CommonObject
public $table_element = 'projet_task'; public $table_element = 'projet_task';
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Field with ID of parent key if this field has a parent
*/ */
public $fk_element = 'fk_task'; public $fk_element = 'fk_task';

View File

@ -46,7 +46,14 @@ class Reception extends CommonObject
{ {
use CommonIncoterm; use CommonIncoterm;
/**
* @var string element name
*/
public $element = "reception"; public $element = "reception";
/**
* @var string Fieldname with ID of parent key if this field has a parent
*/
public $fk_element = "fk_reception"; public $fk_element = "fk_reception";
public $table_element = "reception"; public $table_element = "reception";
public $table_element_line = "commande_fournisseur_dispatch"; public $table_element_line = "commande_fournisseur_dispatch";

View File

@ -153,42 +153,6 @@ class RecruitmentCandidature extends CommonObject
// END MODULEBUILDER PROPERTIES // END MODULEBUILDER PROPERTIES
// If this object has a subtable with lines
/**
* @var int Name of subtable line
*/
//public $table_element_line = 'recruitment_recruitmentcandidatureline';
/**
* @var int Field with ID of parent key if this object has a parent
*/
//public $fk_element = 'fk_recruitmentcandidature';
/**
* @var int Name of subtable class that manage subtable lines
*/
//public $class_element_line = 'RecruitmentCandidatureline';
/**
* @var array List of child tables. To test if we can delete object.
*/
//protected $childtables = array();
/**
* @var array List of child tables. To know object to delete on cascade.
* If name matches '@ClassNAme:FilePathClass;ParentFkFieldName' it will
* call method deleteByParentField(parentId, ParentFkFieldName) to fetch and delete child object
*/
//protected $childtablesoncascade = array('recruitment_recruitmentcandidaturedet');
/**
* @var RecruitmentCandidatureLine[] Array of subtable lines
*/
//public $lines = array();
/** /**
* Constructor * Constructor
* *

View File

@ -168,40 +168,6 @@ class RecruitmentJobPosition extends CommonObject
// END MODULEBUILDER PROPERTIES // END MODULEBUILDER PROPERTIES
// If this object has a subtable with lines
/**
* @var int Name of subtable line
*/
//public $table_element_line = 'recruitment_recruitmentjobpositionline';
/**
* @var int Field with ID of parent key if this field has a parent
*/
//public $fk_element = 'fk_recruitmentjobposition';
/**
* @var int Name of subtable class that manage subtable lines
*/
//public $class_element_line = 'RecruitmentJobPositionline';
/**
* @var array List of child tables. To test if we can delete object.
*/
//protected $childtables=array();
/**
* @var array List of child tables. To know object to delete on cascade.
*/
//protected $childtablesoncascade=array('recruitment_recruitmentjobpositiondet');
/**
* @var RecruitmentJobPositionLine[] Array of subtable lines
*/
//public $lines = array();
/** /**
* Constructor * Constructor
* *

View File

@ -199,15 +199,15 @@ class CompanyPaymentMode extends CommonObject
// If this object has a subtable with lines // If this object has a subtable with lines
/** /**
* @var int Name of subtable line * @var string Name of subtable line
*/ */
//public $table_element_line = 'companypaymentmodedet'; //public $table_element_line = 'companypaymentmodedet';
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Field with ID of parent key if this field has a parent
*/ */
//public $fk_element = 'fk_companypaymentmode'; //public $fk_element = 'fk_companypaymentmode';
/** /**
* @var int Name of subtable class that manage subtable lines * @var string Name of subtable class that manage subtable lines
*/ */
//public $class_element_line = 'CompanyPaymentModeline'; //public $class_element_line = 'CompanyPaymentModeline';
/** /**

View File

@ -59,7 +59,7 @@ class Societe extends CommonObject
public $table_element = 'societe'; public $table_element = 'societe';
/** /**
* @var int Field with ID of parent key if this field has a parent or for child tables * @var string Field with ID of parent key if this field has a parent or for child tables
*/ */
public $fk_element = 'fk_soc'; public $fk_element = 'fk_soc';

View File

@ -161,33 +161,6 @@ class SocieteAccount extends CommonObject
// END MODULEBUILDER PROPERTIES // END MODULEBUILDER PROPERTIES
// If this object has a subtable with lines
/**
* @var int Name of subtable line
*/
//public $table_element_line = 'societe_accountdet';
/**
* @var int Field with ID of parent key if this field has a parent
*/
//public $fk_element = 'fk_societe_account';
/**
* @var int Name of subtable class that manage subtable lines
*/
//public $class_element_line = 'societeAccountline';
/**
* @var array List of child tables. To test if we can delete object.
*/
//protected $childtables=array();
/**
* @var societeAccountLine[] Array of subtable lines
*/
//public $lines = array();
/** /**
* Constructor * Constructor
* *

View File

@ -61,12 +61,12 @@ class SupplierProposal extends CommonObject
public $table_element = 'supplier_proposal'; public $table_element = 'supplier_proposal';
/** /**
* @var int Name of subtable line * @var string Name of subtable line
*/ */
public $table_element_line = 'supplier_proposaldet'; public $table_element_line = 'supplier_proposaldet';
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Field with ID of parent key if this field has a parent
*/ */
public $fk_element = 'fk_supplier_proposal'; public $fk_element = 'fk_supplier_proposal';

View File

@ -54,7 +54,7 @@ class User extends CommonObject
public $table_element = 'user'; public $table_element = 'user';
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Field with ID of parent key if this field has a parent
*/ */
public $fk_element = 'fk_user'; public $fk_element = 'fk_user';

View File

@ -90,7 +90,10 @@ class UserGroup extends CommonObject
*/ */
public $datem; public $datem;
public $note; // Description /**
* @var string Description
*/
public $note;
public $members = array(); // Array of users public $members = array(); // Array of users
@ -111,7 +114,7 @@ class UserGroup extends CommonObject
); );
/** /**
* @var int Field with ID of parent key if this field has a parent * @var string Field with ID of parent key if this field has a parent
*/ */
public $fk_element = 'fk_usergroup'; public $fk_element = 'fk_usergroup';

View File

@ -181,19 +181,19 @@ class WebsitePage extends CommonObject
// If this object has a subtable with lines // If this object has a subtable with lines
/** // /**
* @var int Name of subtable line // * @var string Name of subtable line
*/ // */
//public $table_element_line = 'mymodule_myobjectline'; //public $table_element_line = 'mymodule_myobjectline';
/** /**
* @var int Field with ID of parent key if this field has a parent or for child tables * @var string Field with ID of parent key if this field has a parent or for child tables
*/ */
public $fk_element = 'fk_website_page'; public $fk_element = 'fk_website_page';
/** // /**
* @var int Name of subtable class that manage subtable lines // * @var string Name of subtable class that manage subtable lines
*/ // */
//public $class_element_line = 'MyObjectline'; //public $class_element_line = 'MyObjectline';
/** /**

View File

@ -252,35 +252,6 @@ class Hook extends CommonObject
public $import_key; public $import_key;
// If this object has a subtable with lines
/**
* @var int Name of subtable line
*/
//public $table_element_line = 'hookdet';
/**
* @var int Field with ID of parent key if this field has a parent
*/
//public $fk_element = 'fk_hook';
/**
* @var int Name of subtable class that manage subtable lines
*/
//public $class_element_line = 'MyObjectline';
/**
* @var array Array of child tables (child tables to delete before deleting a record)
*/
//protected $childtables=array('hookdet');
/**
* @var MyObjectLine[] Array of subtable lines
*/
//public $lines = array();
/** /**
* Constructor * Constructor
* *