Merge pull request #25313 from kubajznik/extrafields-support-selectForForms
NEW #25312 Support extrafields in selectForForms
This commit is contained in:
commit
bc53cd7643
5 changed files with 23 additions and 0 deletions
|
|
@ -82,6 +82,11 @@ class Commande extends CommonOrder
|
|||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 1;
|
||||
|
||||
/**
|
||||
* 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user
|
||||
* @var integer
|
||||
|
|
|
|||
|
|
@ -90,6 +90,11 @@ class Facture extends CommonInvoice
|
|||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 1;
|
||||
|
||||
/**
|
||||
* 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user
|
||||
* @var integer
|
||||
|
|
|
|||
|
|
@ -60,6 +60,11 @@ class Contact extends CommonObject
|
|||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -8056,6 +8056,9 @@ class Form
|
|||
|
||||
// Search data
|
||||
$sql = "SELECT t.rowid, " . $fieldstoshow . " FROM " . $this->db->prefix() . $objecttmp->table_element . " as t";
|
||||
if (!empty($objecttmp->isextrafieldmanaged)) {
|
||||
$sql .= " LEFT JOIN " . $this->db->prefix() . $objecttmp->table_element . "_extrafields as e ON t.rowid=e.fk_object";
|
||||
}
|
||||
if (isset($objecttmp->ismultientitymanaged)) {
|
||||
if (!is_numeric($objecttmp->ismultientitymanaged)) {
|
||||
$tmparray = explode('@', $objecttmp->ismultientitymanaged);
|
||||
|
|
|
|||
|
|
@ -79,6 +79,11 @@ class Expedition extends CommonObject
|
|||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue