mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
fix phpstan (#29602)
* fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix travis * fix phpstan * fix phpstan * fix phan * fix phpstan * fix phpstan * fix phpstan * fix phpstan fix phpstan fix phpstan fix phpstan fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix travis * fix phpstan * fix phpstan * fix phpstan --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
parent
28887963be
commit
d0830b3159
|
|
@ -4,7 +4,7 @@
|
|||
* Copyright (C) 2013-2021 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -51,12 +51,6 @@ class AccountingAccount extends CommonObject
|
|||
*/
|
||||
public $picto = 'billr';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 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
|
||||
|
|
@ -168,6 +162,8 @@ class AccountingAccount extends CommonObject
|
|||
public function __construct($db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->next_prev_filter = "fk_pcg_version IN (SELECT pcg_version FROM ".MAIN_DB_PREFIX."accounting_system WHERE rowid = ".((int) getDolGlobalInt('CHARTOFACCOUNTS')).")"; // Used to add a filter in Form::showrefnav method
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,12 +43,6 @@ class AccountingJournal extends CommonObject
|
|||
*/
|
||||
public $fk_element = '';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 0;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||
*/
|
||||
|
|
@ -105,6 +99,8 @@ class AccountingJournal extends CommonObject
|
|||
public function __construct($db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -59,12 +59,6 @@ class Adherent extends CommonObject
|
|||
*/
|
||||
public $table_element = 'adherent';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string picto
|
||||
*/
|
||||
|
|
@ -389,6 +383,7 @@ class Adherent extends CommonObject
|
|||
$this->status = self::STATUS_DRAFT;
|
||||
// l'adherent n'est pas public par default
|
||||
$this->public = 0;
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
// les champs optionnels sont vides
|
||||
$this->array_options = array();
|
||||
|
|
|
|||
|
|
@ -50,12 +50,6 @@ class AdherentType extends CommonObject
|
|||
*/
|
||||
public $picto = 'members';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @deprecated Use label
|
||||
|
|
@ -151,6 +145,8 @@ class AdherentType extends CommonObject
|
|||
public function __construct($db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->status = 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,14 +44,6 @@ class Subscription extends CommonObject
|
|||
*/
|
||||
public $table_element = 'subscription';
|
||||
|
||||
/**
|
||||
* Does this object supports the multicompany module ?
|
||||
*
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 'fk_adherent@adherent';
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||
*/
|
||||
|
|
@ -132,6 +124,8 @@ class Subscription extends CommonObject
|
|||
public function __construct($db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 'fk_adherent@adherent';
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -46,12 +46,6 @@ class Asset extends CommonObject
|
|||
*/
|
||||
public $table_element = 'asset';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for asset. Must be the part after the 'object_' into object_asset.png
|
||||
*/
|
||||
|
|
@ -179,6 +173,7 @@ class Asset extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
|
|
|
|||
|
|
@ -58,12 +58,6 @@ class BOM extends CommonObject
|
|||
*/
|
||||
public $table_element = 'bom_bom';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for bom. Must be the part after the 'object_' into object_bom.png
|
||||
*/
|
||||
|
|
@ -264,6 +258,7 @@ class BOM extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
|
|
|
|||
|
|
@ -49,12 +49,6 @@ class Availabilities extends CommonObject
|
|||
*/
|
||||
public $table_element = 'bookcal_availabilities';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 'fk_bookcal_calendar@bookcal_calendar';
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for availabilities. Must be a 'fa-xxx' fontawesome code (or 'fa-xxx_fa_color_size') or 'availabilities@bookcal' if picto is file 'img/object_availabilities.png'.
|
||||
*/
|
||||
|
|
@ -198,6 +192,7 @@ class Availabilities extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 'fk_bookcal_calendar@bookcal_calendar';
|
||||
$this->isextrafieldmanaged = 1;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid']) && !empty($this->fields['ref'])) {
|
||||
|
|
@ -1082,11 +1077,6 @@ class AvailabilitiesLine extends CommonObjectLine
|
|||
// To complete with content of an object AvailabilitiesLine
|
||||
// We should have a field rowid, fk_availabilities and position
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
|
@ -1095,5 +1085,6 @@ class AvailabilitiesLine extends CommonObjectLine
|
|||
public function __construct(DoliDB $db)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->isextrafieldmanaged = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,17 +49,6 @@ class Calendar extends CommonObject
|
|||
*/
|
||||
public $table_element = 'bookcal_calendar';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for calendar. Must be a 'fa-xxx' fontawesome code (or 'fa-xxx_fa_color_size') or 'calendar@bookcal' if picto is file 'img/object_calendar.png'.
|
||||
*/
|
||||
|
|
@ -163,6 +152,9 @@ class Calendar extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
|
||||
if (!getDolGlobalInt('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid']) && !empty($this->fields['ref'])) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
@ -1076,10 +1068,6 @@ class CalendarLine extends CommonObjectLine
|
|||
// To complete with content of an object CalendarLine
|
||||
// We should have a field rowid, fk_calendar and position
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
|
@ -1089,5 +1077,7 @@ class CalendarLine extends CommonObjectLine
|
|||
public function __construct(DoliDB $db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->isextrafieldmanaged = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -38,12 +39,6 @@ class Bookmark extends CommonObject
|
|||
*/
|
||||
public $table_element = 'bookmark';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||
*/
|
||||
|
|
@ -102,6 +97,8 @@ class Bookmark extends CommonObject
|
|||
public function __construct($db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -59,12 +59,6 @@ class ActionComm extends CommonObject
|
|||
*/
|
||||
public $picto = 'action';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var int<0,2> 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
|
||||
|
|
@ -436,6 +430,8 @@ class ActionComm extends CommonObject
|
|||
public function __construct(DoliDB $db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -42,12 +42,6 @@ class ActionCommReminder extends CommonObject
|
|||
*/
|
||||
public $table_element = 'actioncomm_reminder';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 0;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for actioncommreminder. Must be the part after the 'object_' into object_actioncommreminder.png
|
||||
*/
|
||||
|
|
@ -157,6 +151,8 @@ class ActionCommReminder extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 0;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID')) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -162,11 +163,6 @@ class Mailing extends CommonObject
|
|||
*/
|
||||
public $statut_dest = array();
|
||||
|
||||
/**
|
||||
* @var array labelStatus
|
||||
*/
|
||||
public $labelStatus = array();
|
||||
|
||||
/**
|
||||
* @var array substitutionarray
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -85,12 +85,6 @@ class Propal extends CommonObject
|
|||
*/
|
||||
public $picto = 'propal';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 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
|
||||
|
|
@ -400,6 +394,7 @@ class Propal extends CommonObject
|
|||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->socid = $socid;
|
||||
$this->id = $propalid;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@
|
|||
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2016-2022 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2021-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2022 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2021-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2022 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -78,17 +78,6 @@ class Commande extends CommonOrder
|
|||
*/
|
||||
public $picto = 'order';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
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
|
||||
|
|
@ -390,6 +379,9 @@ class Commande extends CommonOrder
|
|||
public function __construct($db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -50,12 +50,6 @@ class Account extends CommonObject
|
|||
*/
|
||||
public $table_element = 'bank_account';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||
*/
|
||||
|
|
@ -422,6 +416,8 @@ class Account extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
|
||||
$this->balance = 0;
|
||||
|
||||
$this->type_lib = array(
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2018 Andreu Bisquerra <jove@bisquerra.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -40,17 +41,6 @@ class CashControl extends CommonObject
|
|||
*/
|
||||
public $table_element = 'pos_cash_fence';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var int Does pos_cash_fence support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for pos_cash_fence. Must be the part after the 'object_' into object_pos_cash_fence.png
|
||||
*/
|
||||
|
|
@ -151,6 +141,9 @@ class CashControl extends CommonObject
|
|||
public function __construct(DoliDB $db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->isextrafieldmanaged = 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -52,13 +52,6 @@ class Deplacement extends CommonObject
|
|||
*/
|
||||
public $fk_element = '';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 0;
|
||||
|
||||
|
||||
public $fk_soc;
|
||||
public $date;
|
||||
public $type;
|
||||
|
|
@ -127,6 +120,8 @@ class Deplacement extends CommonObject
|
|||
public function __construct(DoliDB $db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -87,17 +87,6 @@ class Facture extends CommonInvoice
|
|||
*/
|
||||
public $picto = 'bill';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
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
|
||||
|
|
@ -435,6 +424,9 @@ class Facture extends CommonInvoice
|
|||
public function __construct(DoliDB $db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -56,17 +56,6 @@ class Contact extends CommonObject
|
|||
*/
|
||||
public $table_element = 'socpeople';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
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
|
||||
*/
|
||||
|
|
@ -372,6 +361,8 @@ class Contact extends CommonObject
|
|||
{
|
||||
$this->db = $db;
|
||||
$this->statut = 1; // By default, status is enabled
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
|
||||
if (!isModEnabled('mailing')) {
|
||||
$this->fields['no_email']['enabled'] = 0;
|
||||
|
|
|
|||
|
|
@ -69,17 +69,6 @@ class Contrat extends CommonObject
|
|||
*/
|
||||
public $picto = 'contract';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
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
|
||||
|
|
@ -311,6 +300,9 @@ class Contrat extends CommonObject
|
|||
public function __construct($db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2157,7 +2157,7 @@ abstract class CommonObject
|
|||
* @param User|string $fuser Update the user of last update field with this user. If not provided, current user is used except if value is 'none'
|
||||
* @param string $trigkey Trigger key to run (in most cases something like 'XXX_MODIFY')
|
||||
* @param string $fk_user_field Name of field to save user id making change
|
||||
* @return int<-1,1> Return integer <0 if KO, >0 if OK
|
||||
* @return int<-2,1> Return integer <0 if KO, >0 if OK
|
||||
* @see updateExtraField()
|
||||
*/
|
||||
public function setValueFrom($field, $value, $table = '', $id = null, $format = '', $id_field = '', $fuser = null, $trigkey = '', $fk_user_field = 'fk_user_modif')
|
||||
|
|
@ -2290,7 +2290,7 @@ abstract class CommonObject
|
|||
* Example: "((t.field1:=:'aa') OR (t.field2:=:'bb'))".
|
||||
* @param string $fieldid Name of field to use for the select MAX and MIN
|
||||
* @param int<0,1> $nodbprefix Do not include DB prefix to forge table name
|
||||
* @return int<-1,1> Return integer <0 if KO, >0 if OK
|
||||
* @return int<-2,1> Return integer <0 if KO, >0 if OK
|
||||
*/
|
||||
public function load_previous_next_ref($filter, $fieldid, $nodbprefix = 0)
|
||||
{
|
||||
|
|
@ -9813,7 +9813,7 @@ abstract class CommonObject
|
|||
*
|
||||
* @param User $user User that creates
|
||||
* @param int<0,1> $notrigger 0=launch triggers after, 1=disable triggers
|
||||
* @return int<-1,-1> Return integer <0 if KO, Id of created object if OK
|
||||
* @return int<-1,max> Return integer <0 if KO, Id of created object if OK
|
||||
*/
|
||||
public function createCommon(User $user, $notrigger = 0)
|
||||
{
|
||||
|
|
@ -10003,7 +10003,7 @@ abstract class CommonObject
|
|||
* @param string $ref Ref
|
||||
* @param string $morewhere More SQL filters (' AND ...')
|
||||
* @param int<0,1> $noextrafields 0=Default to load extrafields, 1=No extrafields
|
||||
* @return int<-1,1> Return integer <0 if KO, 0 if not found, >0 if OK
|
||||
* @return int<-4,1> Return integer <0 if KO, 0 if not found, >0 if OK
|
||||
*/
|
||||
public function fetchCommon($id, $ref = null, $morewhere = '', $noextrafields = 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -43,17 +43,6 @@ class DefaultValues extends CommonObject
|
|||
*/
|
||||
public $table_element = 'default_values';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||
*/
|
||||
|
|
@ -146,6 +135,9 @@ class DefaultValues extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->isextrafieldmanaged = 0;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,12 +45,6 @@ class EmailSenderProfile extends CommonObject
|
|||
*/
|
||||
public $table_element = 'c_email_senderprofile';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for emailsenderprofile
|
||||
*/
|
||||
|
|
@ -145,6 +139,8 @@ class EmailSenderProfile extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID')) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,12 +56,6 @@ class Fiscalyear extends CommonObject
|
|||
*/
|
||||
public $fk_element = '';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var int ID
|
||||
*/
|
||||
|
|
@ -124,6 +118,7 @@ class Fiscalyear extends CommonObject
|
|||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->labelStatusShort = array(self::STATUS_OPEN => 'Opened', self::STATUS_CLOSED => 'Closed');
|
||||
$this->labelStatus = array(self::STATUS_OPEN => 'Opened', self::STATUS_CLOSED => 'Closed');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,17 +49,6 @@ class TimeSpent extends CommonObject
|
|||
*/
|
||||
public $table_element = 'element_time';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 0;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for timespent. Must be a 'fa-xxx' fontawesome code (or 'fa-xxx_fa_color_size') or 'timespent@timespent' if picto is file 'img/object_timespent.png'.
|
||||
*/
|
||||
|
|
@ -164,6 +153,9 @@ class TimeSpent extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 0;
|
||||
$this->isextrafieldmanaged = 0;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid']) && !empty($this->fields['ref'])) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018-2022 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) - 2013-2018 Jean-François FERRY <hello@librethic.io>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -110,11 +110,6 @@ class Delivery extends CommonObject
|
|||
|
||||
public $commande_id;
|
||||
|
||||
/**
|
||||
* @var array Status labels
|
||||
*/
|
||||
public $labelStatus;
|
||||
|
||||
/**
|
||||
* @var DeliveryLine[] lines
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -56,12 +56,6 @@ class Don extends CommonObject
|
|||
*/
|
||||
public $fk_element = 'fk_donation';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for object don. Must be the part after the 'object_' into object_myobject.png
|
||||
*/
|
||||
|
|
@ -154,18 +148,6 @@ class Don extends CommonObject
|
|||
|
||||
public $paid;
|
||||
|
||||
|
||||
/**
|
||||
* @var array Array of status label
|
||||
*/
|
||||
public $labelStatus;
|
||||
|
||||
/**
|
||||
* @var array Array of status label short
|
||||
*/
|
||||
public $labelStatusShort;
|
||||
|
||||
|
||||
const STATUS_DRAFT = 0;
|
||||
const STATUS_VALIDATED = 1;
|
||||
const STATUS_PAID = 2;
|
||||
|
|
@ -180,6 +162,8 @@ class Don extends CommonObject
|
|||
public function __construct($db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -305,6 +289,7 @@ class Don extends CommonObject
|
|||
|
||||
$error_string = array();
|
||||
$err = 0;
|
||||
$amount_invalid = 0;
|
||||
|
||||
if (dol_strlen(trim($this->societe)) == 0) {
|
||||
if ((dol_strlen(trim($this->lastname)) + dol_strlen(trim($this->firstname))) == 0) {
|
||||
|
|
|
|||
|
|
@ -68,17 +68,6 @@ class EmailCollector extends CommonObject
|
|||
*/
|
||||
public $table_element = 'emailcollector_emailcollector';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var int Does emailcollector support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for emailcollector. Must be the part after the 'object_' into object_emailcollector.png
|
||||
*/
|
||||
|
|
@ -247,6 +236,9 @@ class EmailCollector extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->isextrafieldmanaged = 0;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,17 +42,6 @@ class EmailCollectorAction extends CommonObject
|
|||
*/
|
||||
public $table_element = 'emailcollector_emailcollectoraction';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 0;
|
||||
|
||||
/**
|
||||
* @var int Does emailcollectoraction support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for emailcollectoraction. Must be the part after the 'object_' into object_emailcollectoraction.png
|
||||
*/
|
||||
|
|
@ -123,6 +112,9 @@ class EmailCollectorAction extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 0;
|
||||
$this->isextrafieldmanaged = 0;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,17 +44,6 @@ class EmailCollectorFilter extends CommonObject
|
|||
*/
|
||||
public $table_element = 'emailcollector_emailcollectorfilter';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 0;
|
||||
|
||||
/**
|
||||
* @var int Does emailcollectorfilter support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for emailcollectorfilter. Must be the part after the 'object_' into object_emailcollectorfilter.png
|
||||
*/
|
||||
|
|
@ -125,6 +114,9 @@ class EmailCollectorFilter extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 0;
|
||||
$this->isextrafieldmanaged = 0;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,18 +49,6 @@ class ConferenceOrBooth extends ActionComm
|
|||
*/
|
||||
public $table_element = 'actioncomm';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var int<0,1> Does this object support extrafields ?
|
||||
* 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for conferenceorbooth. Must be the part after the 'object_' into object_conferenceorbooth.png
|
||||
*/
|
||||
|
|
@ -162,6 +150,9 @@ class ConferenceOrBooth extends ActionComm
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
$this->fields['id']['visible'] = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,17 +49,6 @@ class ConferenceOrBoothAttendee extends CommonObject
|
|||
*/
|
||||
public $table_element = 'eventorganization_conferenceorboothattendee';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 'fk_project@projet';
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for conferenceorboothattendee. Must be the part after the 'object_' into object_conferenceorboothattendee.png
|
||||
*/
|
||||
|
|
@ -198,6 +187,9 @@ class ConferenceOrBoothAttendee extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 'fk_project@projet';
|
||||
$this->isextrafieldmanaged = 1;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
@ -1120,11 +1112,6 @@ class ConferenceOrBoothAttendeeLine extends CommonObjectLine
|
|||
// To complete with content of an object ConferenceOrBoothAttendeeLine
|
||||
// We should have a field rowid, fk_conferenceorboothattendee and position
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
|
@ -1133,5 +1120,7 @@ class ConferenceOrBoothAttendeeLine extends CommonObjectLine
|
|||
public function __construct(DoliDB $db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->isextrafieldmanaged = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,17 +74,6 @@ class Expedition extends CommonObject
|
|||
*/
|
||||
public $table_element_line = "expeditiondet";
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
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
|
||||
*/
|
||||
|
|
@ -282,6 +271,9 @@ class Expedition extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
|
||||
// List of long language codes for status
|
||||
$this->labelStatus = array();
|
||||
$this->labelStatus[-1] = 'StatusSendingCanceled';
|
||||
|
|
|
|||
|
|
@ -247,16 +247,6 @@ class ExpenseReport extends CommonObject
|
|||
public $localtax1; // for backward compatibility (real field should be total_localtax1 defined into CommonObject)
|
||||
public $localtax2; // for backward compatibility (real field should be total_localtax2 defined into CommonObject)
|
||||
|
||||
/**
|
||||
* @var array<int,string>
|
||||
*/
|
||||
public $labelStatus = array();
|
||||
|
||||
/**
|
||||
* @var array<int,string>
|
||||
*/
|
||||
public $labelStatusShort = array();
|
||||
|
||||
/**
|
||||
* Draft status
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -74,12 +74,6 @@ class CommandeFournisseur extends CommonOrder
|
|||
*/
|
||||
public $picto = 'supplier_order';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 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
|
||||
|
|
@ -122,16 +116,6 @@ class CommandeFournisseur extends CommonOrder
|
|||
// -> 9=Refused -> (reopen) 1=Validated
|
||||
// Note: billed or not is on another field "billed"
|
||||
|
||||
/**
|
||||
* @var array List of status
|
||||
*/
|
||||
public $labelStatus;
|
||||
|
||||
/**
|
||||
* @var array List of status short
|
||||
*/
|
||||
public $labelStatusShort;
|
||||
|
||||
public $billed;
|
||||
|
||||
/**
|
||||
|
|
@ -464,6 +448,8 @@ class CommandeFournisseur extends CommonOrder
|
|||
public function __construct($db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -77,12 +77,6 @@ class FactureFournisseur extends CommonInvoice
|
|||
*/
|
||||
public $picto = 'supplier_invoice';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 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
|
||||
|
|
@ -378,6 +372,8 @@ class FactureFournisseur extends CommonInvoice
|
|||
public function __construct($db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -44,12 +44,6 @@ class Holiday extends CommonObject
|
|||
*/
|
||||
public $table_element = 'holiday';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 0;
|
||||
|
||||
/**
|
||||
* @var string Field with ID of parent key if this field has a parent
|
||||
*/
|
||||
|
|
@ -201,6 +195,8 @@ class Holiday extends CommonObject
|
|||
public function __construct($db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -50,12 +50,6 @@ class Establishment extends CommonObject
|
|||
*/
|
||||
public $fk_element = 'fk_establishment';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||
*/
|
||||
|
|
@ -160,6 +154,8 @@ class Establishment extends CommonObject
|
|||
public function __construct($db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -52,17 +52,6 @@ class Evaluation extends CommonObject
|
|||
*/
|
||||
public $table_element = 'hrm_evaluation';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 0;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for evaluation. Must be the part after the 'object_' into object_evaluation.png
|
||||
*/
|
||||
|
|
@ -186,6 +175,9 @@ class Evaluation extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 0;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,17 +52,6 @@ class EvaluationLine extends CommonObjectLine
|
|||
*/
|
||||
public $table_element = 'hrm_evaluationdet';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 0;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for evaluationdet. Must be the part after the 'object_' into object_evaluationdet.png
|
||||
*/
|
||||
|
|
@ -174,6 +163,9 @@ class EvaluationLine extends CommonObjectLine
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 0;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,17 +51,6 @@ class Job extends CommonObject
|
|||
*/
|
||||
public $table_element = 'hrm_job';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 0;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for job. Must be the part after the 'object_' into object_job.png
|
||||
*/
|
||||
|
|
@ -177,6 +166,9 @@ class Job extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 0;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
@ -1109,11 +1101,6 @@ class JobLine extends CommonObjectLine
|
|||
// To complete with content of an object JobLine
|
||||
// We should have a field rowid, fk_job and position
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
|
@ -1122,5 +1109,7 @@ class JobLine extends CommonObjectLine
|
|||
public function __construct(DoliDB $db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->isextrafieldmanaged = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,17 +50,6 @@ class Position extends CommonObject
|
|||
*/
|
||||
public $table_element = 'hrm_job_user';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 0;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for position. Must be the part after the 'object_' into object_position.png
|
||||
*/
|
||||
|
|
@ -184,6 +173,9 @@ class Position extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 0;
|
||||
$this->isextrafieldmanaged = 0;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
//$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
@ -1134,11 +1126,6 @@ class PositionLine extends CommonObjectLine
|
|||
// To complete with content of an object PositionLine
|
||||
// We should have a field rowid , fk_position and position
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
|
@ -1147,5 +1134,7 @@ class PositionLine extends CommonObjectLine
|
|||
public function __construct(DoliDB $db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->isextrafieldmanaged = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,17 +56,6 @@ class Skill extends CommonObject
|
|||
*/
|
||||
public $table_element_line = 'skilldet';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 0;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for skill. Must be the part after the 'object_' into object_skill.png
|
||||
*/
|
||||
|
|
@ -186,6 +175,9 @@ class Skill extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 0;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,17 +50,6 @@ class Skilldet extends CommonObjectLine
|
|||
*/
|
||||
public $table_element = 'hrm_skilldet';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 0;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for skilldet. Must be the part after the 'object_' into object_skilldet.png
|
||||
*/
|
||||
|
|
@ -166,6 +155,9 @@ class Skilldet extends CommonObjectLine
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 0;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,17 +51,6 @@ class SkillRank extends CommonObject
|
|||
*/
|
||||
public $table_element = 'hrm_skillrank';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 0;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for skillrank. Must be the part after the 'object_' into object_skillrank.png
|
||||
*/
|
||||
|
|
@ -176,6 +165,9 @@ class SkillRank extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 0;
|
||||
$this->isextrafieldmanaged = 0;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,12 +48,6 @@ class IntracommReport extends CommonObject
|
|||
*/
|
||||
public $fk_element = 'fk_intracommreport';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
public $picto = 'intracommreport';
|
||||
|
||||
/**
|
||||
|
|
@ -106,6 +100,8 @@ class IntracommReport extends CommonObject
|
|||
public function __construct(DoliDB $db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->exporttype = 'deb';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,17 +48,6 @@ class KnowledgeRecord extends CommonObject
|
|||
*/
|
||||
public $table_element = 'knowledgemanagement_knowledgerecord';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for knowledgerecord. Must be the part after the 'object_' into object_knowledgerecord.png
|
||||
*/
|
||||
|
|
@ -193,6 +182,9 @@ class KnowledgeRecord extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
@ -200,12 +192,6 @@ class KnowledgeRecord extends CommonObject
|
|||
$this->fields['entity']['enabled'] = 0;
|
||||
}
|
||||
|
||||
// Example to show how to set values of fields definition dynamically
|
||||
/*if ($user->hasRight('knowledgemanagement', 'knowledgerecord', 'read')) {
|
||||
$this->fields['myfield']['visible'] = 1;
|
||||
$this->fields['myfield']['noteditable'] = 0;
|
||||
}*/
|
||||
|
||||
// Unset fields that are disabled
|
||||
foreach ($this->fields as $key => $val) {
|
||||
if (isset($val['enabled']) && empty($val['enabled'])) {
|
||||
|
|
@ -1190,11 +1176,6 @@ class KnowledgeRecordLine extends CommonObjectLine
|
|||
// To complete with content of an object KnowledgeRecordLine
|
||||
// We should have a field rowid, fk_knowledgerecord and position
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
|
@ -1203,5 +1184,7 @@ class KnowledgeRecordLine extends CommonObjectLine
|
|||
public function __construct(DoliDB $db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->isextrafieldmanaged = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (C) 2018-2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2023 Alexandre Janniaux <alexandre.janniaux@gmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -541,9 +542,9 @@ if ($dirins && $action == 'initsqlextrafields' && !empty($module)) {
|
|||
}
|
||||
}
|
||||
|
||||
// Now we update the object file to set $isextrafieldmanaged to 1
|
||||
// Now we update the object file to set $this->isextrafieldmanaged to 1
|
||||
$srcfile = $dirins.'/'.strtolower($module).'/class/'.strtolower($objectname).'.class.php';
|
||||
$arrayreplacement = array('/\$isextrafieldmanaged = 0;/' => '$isextrafieldmanaged = 1;');
|
||||
$arrayreplacement = array('/\$this->isextrafieldmanaged = 0;/' => '$this->isextrafieldmanaged = 1;');
|
||||
dolReplaceInFile($srcfile, $arrayreplacement, '', 0, 0, 1);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,17 +54,6 @@ class MyObject extends CommonObject
|
|||
*/
|
||||
//public $element_for_permission = 'mymodule';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 0;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for myobject. Must be a 'fa-xxx' fontawesome code (or 'fa-xxx_fa_color_size') or 'myobject@mymodule' if picto is file 'img/object_myobject.png'.
|
||||
*/
|
||||
|
|
@ -251,6 +240,8 @@ class MyObject extends CommonObject
|
|||
global $langs;
|
||||
|
||||
$this->db = $db;
|
||||
$this->ismultientitymanaged = 0;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
|
||||
if (!getDolGlobalInt('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid']) && !empty($this->fields['ref'])) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
|
|
@ -1258,11 +1249,6 @@ class MyObjectLine extends CommonObjectLine
|
|||
// To complete with content of an object MyObjectLine
|
||||
// We should have a field rowid, fk_myobject and position
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
|
@ -1271,5 +1257,7 @@ class MyObjectLine extends CommonObjectLine
|
|||
public function __construct(DoliDB $db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->isextrafieldmanaged = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,17 +44,6 @@ class Mo extends CommonObject
|
|||
*/
|
||||
public $table_element = 'mrp_mo';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var int Does mo support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for mo. Must be the part after the 'object_' into object_mo.png
|
||||
*/
|
||||
|
|
@ -247,7 +236,7 @@ class Mo extends CommonObject
|
|||
public $fk_parent_line;
|
||||
|
||||
/**
|
||||
* @var array tpl
|
||||
* @var array<string,int|string> tpl
|
||||
*/
|
||||
public $tpl = array();
|
||||
|
||||
|
|
@ -263,6 +252,9 @@ class Mo extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
@ -1998,17 +1990,6 @@ class MoLine extends CommonObjectLine
|
|||
*/
|
||||
public $table_element = 'mrp_production';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 0;
|
||||
|
||||
/**
|
||||
* @var int Does moline support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 1;
|
||||
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'ID', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 10),
|
||||
'fk_mo' => array('type' => 'integer', 'label' => 'Mo', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 15),
|
||||
|
|
@ -2071,6 +2052,9 @@ class MoLine extends CommonObjectLine
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 0;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,17 +49,6 @@ class Partnership extends CommonObject
|
|||
*/
|
||||
public $table_element = 'partnership';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 0;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for partnership. Must be the part after the 'object_' into object_partnership.png
|
||||
*/
|
||||
|
|
@ -166,6 +155,9 @@ class Partnership extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 0;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
|
||||
if (getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR') == 'member') {
|
||||
$this->fields['fk_member'] = array('type' => 'integer:Adherent:adherents/class/adherent.class.php:1', 'label' => 'Member', 'enabled' => '1', 'position' => 50, 'notnull' => -1, 'visible' => 1, 'index' => 1, 'picto' => 'member', 'csslist' => 'tdoverflowmax150');
|
||||
} else {
|
||||
|
|
@ -1375,10 +1367,6 @@ class PartnershipLine extends CommonObjectLine
|
|||
// To complete with content of an object PartnershipLine
|
||||
// We should have a field rowid, fk_partnership and position
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
|
@ -1388,5 +1376,7 @@ class PartnershipLine extends CommonObjectLine
|
|||
public function __construct(DoliDB $db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->isextrafieldmanaged = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,12 +51,6 @@ class PartnershipType extends CommonObject
|
|||
*/
|
||||
public $picto = 'generic';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string Partnership code
|
||||
*/
|
||||
|
|
@ -91,6 +85,8 @@ class PartnershipType extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,17 +89,6 @@ class Product extends CommonObject
|
|||
'commande_fournisseurdet' => array('name' => 'SupplierOrder', 'parent' => 'commande_fournisseur', 'parentkey' => 'fk_commande')
|
||||
);
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string picto
|
||||
*/
|
||||
|
|
@ -628,6 +617,10 @@ class Product extends CommonObject
|
|||
public function __construct($db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
|
||||
$this->canvas = '';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,17 +42,6 @@ class ProductFournisseurPrice extends CommonObject
|
|||
*/
|
||||
public $table_element = 'product_fournisseur_price';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for productfournisseurprice. Must be the part after the 'object_' into object_productfournisseurprice.png
|
||||
*/
|
||||
|
|
@ -178,6 +167,9 @@ class ProductFournisseurPrice extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,17 +48,6 @@ class Inventory extends CommonObject
|
|||
*/
|
||||
public $table_element = 'inventory';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for inventory
|
||||
*/
|
||||
|
|
@ -232,6 +221,9 @@ class Inventory extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->isextrafieldmanaged = 0;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID')) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
@ -808,17 +800,6 @@ class InventoryLine extends CommonObjectLine
|
|||
*/
|
||||
public $table_element = 'inventorydet';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 0;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for inventory
|
||||
*/
|
||||
|
|
@ -876,7 +857,18 @@ class InventoryLine extends CommonObjectLine
|
|||
public $pmp_real;
|
||||
public $pmp_expected;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
public function __construct($db)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->ismultientitymanaged = 0;
|
||||
|
||||
$this->isextrafieldmanaged = 0;
|
||||
}
|
||||
/**
|
||||
* Create object in database
|
||||
*
|
||||
|
|
|
|||
|
|
@ -50,12 +50,6 @@ class Entrepot extends CommonObject
|
|||
*/
|
||||
public $picto = 'stock';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string Label
|
||||
* @deprecated
|
||||
|
|
@ -120,12 +114,6 @@ class Entrepot extends CommonObject
|
|||
*/
|
||||
public $warehouse_usage;
|
||||
|
||||
/**
|
||||
* @var array List of short language codes for status
|
||||
*/
|
||||
public $labelStatus = array();
|
||||
|
||||
|
||||
/**
|
||||
* 'type' field format:
|
||||
* 'integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter[:Sortfield]]]',
|
||||
|
|
@ -226,6 +214,8 @@ class Entrepot extends CommonObject
|
|||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
|
||||
$this->labelStatus[self::STATUS_CLOSED] = 'Closed2';
|
||||
if (getDolGlobalString('ENTREPOT_EXTRA_STATUS')) {
|
||||
$this->labelStatus[self::STATUS_OPEN_ALL] = 'OpenAnyMovement';
|
||||
|
|
|
|||
|
|
@ -52,12 +52,6 @@ class Productlot extends CommonObject
|
|||
*/
|
||||
public $picto = 'lot';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
public $stats_propale;
|
||||
public $stats_commande;
|
||||
public $stats_contrat;
|
||||
|
|
@ -173,6 +167,8 @@ class Productlot extends CommonObject
|
|||
public function __construct(DoliDB $db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -52,18 +52,6 @@ class StockTransfer extends CommonObject
|
|||
*/
|
||||
public $table_element_line = 'stocktransfer_stocktransferline';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 0;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 1;
|
||||
|
||||
|
||||
/**
|
||||
* @var string[] List of child tables. To know object to delete on cascade.
|
||||
* If name matches '@ClassNAme:FilePathClass;ParentFkFieldName' it will
|
||||
|
|
@ -195,6 +183,10 @@ class StockTransfer extends CommonObject
|
|||
global $conf, $langs;
|
||||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 0;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
|
||||
$this->origin_type = 'StockTransfer@product/stock/stocktransfer';
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
|
|
@ -1078,27 +1070,3 @@ class StockTransfer extends CommonObject
|
|||
return $error;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Class StockTransferLine. You can also remove this and generate a CRUD class for lines objects.
|
||||
*/
|
||||
//class StockTransferLine
|
||||
//{
|
||||
// // To complete with content of an object StockTransferLine
|
||||
// // We should have a field rowid, fk_stocktransfer and position
|
||||
//
|
||||
// /**
|
||||
// * @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
// */
|
||||
// public $isextrafieldmanaged = 0;
|
||||
//
|
||||
// /**
|
||||
// * Constructor
|
||||
// *
|
||||
// * @param DoliDB $db Database handler
|
||||
// */
|
||||
// public function __construct(DoliDB $db)
|
||||
// {
|
||||
// $this->db = $db;
|
||||
// }
|
||||
//}
|
||||
|
|
|
|||
|
|
@ -45,23 +45,11 @@ class StockTransferLine extends CommonObjectLine
|
|||
*/
|
||||
public $table_element = 'stocktransfer_stocktransferline';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 0;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for stocktransferline. Must be the part after the 'object_' into object_stocktransferline.png
|
||||
*/
|
||||
public $picto = 'stocktransferline@stocktransfer';
|
||||
|
||||
|
||||
const STATUS_DRAFT = 0;
|
||||
const STATUS_VALIDATED = 1;
|
||||
const STATUS_CANCELED = 9;
|
||||
|
|
@ -136,6 +124,9 @@ class StockTransferLine extends CommonObjectLine
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 0;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,17 +62,6 @@ class Project extends CommonObject
|
|||
*/
|
||||
public $fk_element = 'fk_projet';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
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
|
||||
*/
|
||||
|
|
@ -204,9 +193,6 @@ class Project extends CommonObject
|
|||
*/
|
||||
public $max_attendees;
|
||||
|
||||
public $labelStatusShort;
|
||||
public $labelStatus;
|
||||
|
||||
public $statut; // 0=draft, 1=opened, 2=closed
|
||||
|
||||
public $opp_status; // opportunity status, into table llx_c_lead_status
|
||||
|
|
@ -366,6 +352,9 @@ class Project extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
|
||||
$this->labelStatusShort = array(0 => 'Draft', 1 => 'Opened', 2 => 'Closed');
|
||||
$this->labelStatus = array(0 => 'Draft', 1 => 'Opened', 2 => 'Closed');
|
||||
|
||||
|
|
|
|||
|
|
@ -149,16 +149,6 @@ class Task extends CommonObjectLine
|
|||
|
||||
public $comments = array();
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
public $labelStatus;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
public $labelStatusShort;
|
||||
|
||||
// Properties calculated from sum of llx_element_time linked to task
|
||||
public $tobill;
|
||||
public $billed;
|
||||
|
|
|
|||
|
|
@ -69,12 +69,6 @@ class Reception extends CommonObject
|
|||
public $table_element = "reception";
|
||||
public $table_element_line = "receptiondet_batch";
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||
*/
|
||||
|
|
@ -154,6 +148,8 @@ class Reception extends CommonObject
|
|||
public function __construct($db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -39,16 +39,6 @@ class ReceptionLineBatch extends CommonObjectLine
|
|||
*/
|
||||
public $db;
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error;
|
||||
|
||||
/**
|
||||
* @var string[] Error codes (or messages)
|
||||
*/
|
||||
public $errors = array();
|
||||
|
||||
/**
|
||||
* @var string ID to identify managed object
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -48,17 +48,6 @@ class RecruitmentCandidature extends CommonObject
|
|||
*/
|
||||
public $table_element = 'recruitment_recruitmentcandidature';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for recruitmentcandidature. Must be the part after the 'object_' into object_recruitmentcandidature.png
|
||||
*/
|
||||
|
|
@ -174,6 +163,9 @@ class RecruitmentCandidature extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,17 +49,6 @@ class RecruitmentJobPosition extends CommonObject
|
|||
*/
|
||||
public $table_element = 'recruitment_recruitmentjobposition';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for recruitmentjobposition. Must be the part after the 'object_' into object_recruitmentjobposition.png
|
||||
*/
|
||||
|
|
@ -195,6 +184,9 @@ class RecruitmentJobPosition extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,17 +43,6 @@ class CompanyPaymentMode extends CommonObject
|
|||
*/
|
||||
public $table_element = 'societe_rib';
|
||||
|
||||
/**
|
||||
* @var string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table
|
||||
*/
|
||||
public $ismultientitymanaged = 'fk_soc@societe';
|
||||
|
||||
/**
|
||||
* @var int Does companypaymentmode support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for companypaymentmode. Must be the part after the 'object_' into object_companypaymentmode.png
|
||||
*/
|
||||
|
|
@ -214,6 +203,9 @@ class CompanyPaymentMode extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 'fk_soc@societe';
|
||||
$this->isextrafieldmanaged = 0;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -127,17 +127,6 @@ class Societe extends CommonObject
|
|||
*/
|
||||
public $picto = 'company';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
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
|
||||
|
|
@ -889,6 +878,8 @@ class Societe extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
$this->client = 0;
|
||||
$this->prospect = 0;
|
||||
$this->fournisseur = 0;
|
||||
|
|
|
|||
|
|
@ -46,12 +46,6 @@ class SocieteAccount extends CommonObject
|
|||
*/
|
||||
public $table_element = 'societe_account';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 0;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for societeaccount. Must be the part after the 'object_' into object_myobject.png
|
||||
*/
|
||||
|
|
@ -199,6 +193,8 @@ class SocieteAccount extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 0;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID')) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,12 +77,6 @@ class SupplierProposal extends CommonObject
|
|||
*/
|
||||
public $picto = 'supplier_proposal';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 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
|
||||
|
|
@ -235,6 +229,7 @@ class SupplierProposal extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->socid = $socid;
|
||||
$this->id = $supplier_proposalid;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,17 +49,6 @@ class CTicketCategory extends CommonObject
|
|||
*/
|
||||
public $table_element = 'c_ticket_category';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 0;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||
*/
|
||||
|
|
@ -183,6 +172,9 @@ class CTicketCategory extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 0;
|
||||
$this->isextrafieldmanaged = 0;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
@ -190,12 +182,6 @@ class CTicketCategory extends CommonObject
|
|||
$this->fields['entity']['enabled'] = 0;
|
||||
}
|
||||
|
||||
// Example to show how to set values of fields definition dynamically
|
||||
/*if ($user->hasRight('mymodule', 'myobject', 'read')) {
|
||||
$this->fields['myfield']['visible'] = 1;
|
||||
$this->fields['myfield']['noteditable'] = 0;
|
||||
}*/
|
||||
|
||||
// Unset fields that are disabled
|
||||
foreach ($this->fields as $key => $val) {
|
||||
if (isset($val['enabled']) && empty($val['enabled'])) {
|
||||
|
|
|
|||
|
|
@ -59,23 +59,11 @@ class Ticket extends CommonObject
|
|||
*/
|
||||
public $fk_element = 'fk_ticket';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var int Does ticketcore support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for ticketcore. Must be the part after the 'object_' into object_ticketcore.png
|
||||
*/
|
||||
public $picto = 'ticket';
|
||||
|
||||
|
||||
/**
|
||||
* @var ?string Hash to identify ticket publicly
|
||||
*/
|
||||
|
|
@ -234,16 +222,6 @@ class Ticket extends CommonObject
|
|||
*/
|
||||
public $cache_msgs_ticket;
|
||||
|
||||
/**
|
||||
* @var array status labels
|
||||
*/
|
||||
public $labelStatus;
|
||||
|
||||
/**
|
||||
* @var array status short labels
|
||||
*/
|
||||
public $labelStatusShort;
|
||||
|
||||
/**
|
||||
* @var int Notify thirdparty at create
|
||||
*/
|
||||
|
|
@ -366,6 +344,9 @@ class Ticket extends CommonObject
|
|||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
|
||||
$this->labelStatusShort = array(
|
||||
self::STATUS_NOT_READ => 'Unread',
|
||||
self::STATUS_READ => 'Read',
|
||||
|
|
|
|||
|
|
@ -65,17 +65,6 @@ class User extends CommonObject
|
|||
*/
|
||||
public $fk_element = 'fk_user';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string picto
|
||||
*/
|
||||
|
|
@ -421,6 +410,8 @@ class User extends CommonObject
|
|||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
// User preference
|
||||
$this->clicktodial_loaded = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -50,12 +50,6 @@ class UserGroup extends CommonObject
|
|||
*/
|
||||
public $table_element = 'usergroup';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||
*/
|
||||
|
|
@ -151,6 +145,8 @@ class UserGroup extends CommonObject
|
|||
public function __construct($db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->nb_rights = 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2022 Open-Dsi <support@open-dsi.fr>
|
||||
* Copyright (C) 2023 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2023-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -66,17 +66,6 @@ class ProductAttribute extends CommonObject
|
|||
*/
|
||||
public $fk_element = 'fk_product_attribute';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for conferenceorbooth. Must be the part after the 'object_' into object_conferenceorbooth.png
|
||||
*/
|
||||
|
|
@ -176,6 +165,9 @@ class ProductAttribute extends CommonObject
|
|||
global $conf, $langs;
|
||||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->isextrafieldmanaged = 0;
|
||||
$this->entity = $conf->entity;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2022 Open-Dsi <support@open-dsi.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -39,17 +40,6 @@ class ProductAttributeValue extends CommonObjectLine
|
|||
*/
|
||||
public $table_element = 'product_attribute_value';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* 'type' field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[:Filter]]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'text:none', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password')
|
||||
* Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)"
|
||||
|
|
@ -101,6 +91,9 @@ class ProductAttributeValue extends CommonObjectLine
|
|||
global $conf, $langs;
|
||||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->isextrafieldmanaged = 0;
|
||||
$this->entity = $conf->entity;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
|
|
|
|||
|
|
@ -49,17 +49,6 @@ class Target extends CommonObject
|
|||
*/
|
||||
public $table_element = 'webhook_target';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 0;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for target. Must be the part after the 'object_' into object_target.png
|
||||
*/
|
||||
|
|
@ -182,6 +171,9 @@ class Target extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 0;
|
||||
$this->isextrafieldmanaged = 0;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
@ -1007,11 +999,6 @@ class TargetLine extends CommonObjectLine
|
|||
// To complete with content of an object TargetLine
|
||||
// We should have a field rowid, fk_target and position
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
|
@ -1020,5 +1007,7 @@ class TargetLine extends CommonObjectLine
|
|||
public function __construct(DoliDB $db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->isextrafieldmanaged = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2023-2024 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2023-2024 Lionel Vessiller <lvessiller@easya.solutions>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -36,11 +37,6 @@ class WebPortalInvoice extends Facture
|
|||
*/
|
||||
public $module = 'webportal';
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* Status list (short label)
|
||||
*/
|
||||
|
|
@ -152,6 +148,8 @@ class WebPortalInvoice extends Facture
|
|||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->isextrafieldmanaged = 0;
|
||||
|
||||
$this->getInvoiceStatic();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2023-2024 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2023-2024 Lionel Vessiller <lvessiller@easya.solutions>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -36,11 +37,6 @@ class WebPortalMember extends Adherent
|
|||
*/
|
||||
public $module = 'webportal';
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* Status list (short label)
|
||||
*/
|
||||
|
|
@ -198,6 +194,8 @@ class WebPortalMember extends Adherent
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->isextrafieldmanaged = 0;
|
||||
|
||||
$this->getMemberStatic();
|
||||
|
||||
// Translate some data of arrayofkeyval
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2023-2024 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2023-2024 Lionel Vessiller <lvessiller@easya.solutions>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -36,11 +37,6 @@ class WebPortalOrder extends Commande
|
|||
*/
|
||||
public $module = 'webportal';
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* Status list (short label)
|
||||
*/
|
||||
|
|
@ -153,6 +149,8 @@ class WebPortalOrder extends Commande
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->isextrafieldmanaged = 0;
|
||||
|
||||
$this->getOrderStatic();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2023-2024 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2023-2024 Lionel Vessiller <lvessiller@easya.solutions>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -36,11 +37,6 @@ class WebPortalPartnership extends Partnership
|
|||
*/
|
||||
public $module = 'webportal';
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* Status list (short label)
|
||||
*/
|
||||
|
|
@ -174,6 +170,8 @@ class WebPortalPartnership extends Partnership
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->isextrafieldmanaged = 0;
|
||||
|
||||
$this->getPartnershipStatic();
|
||||
|
||||
// Translate some data of arrayofkeyval
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2023-2024 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2023-2024 Lionel Vessiller <lvessiller@easya.solutions>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -36,11 +37,6 @@ class WebPortalPropal extends Propal
|
|||
*/
|
||||
public $module = 'webportal';
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* Status list (short label)
|
||||
*/
|
||||
|
|
@ -153,6 +149,8 @@ class WebPortalPropal extends Propal
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->isextrafieldmanaged = 0;
|
||||
|
||||
$this->getPropalStatic();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,16 +47,8 @@ class Website extends CommonObject
|
|||
*/
|
||||
public $table_element = 'website';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
|
||||
protected $childtablesoncascade = array();
|
||||
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for website. Must be the part after the 'object_' into object_myobject.png
|
||||
*/
|
||||
|
|
@ -149,6 +141,8 @@ class Website extends CommonObject
|
|||
public function __construct(DoliDB $db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -47,17 +47,6 @@ class Workstation extends CommonObject
|
|||
*/
|
||||
public $table_element = 'workstation_workstation';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for workstation. Must be the part after the 'object_' into object_workstation.png
|
||||
*/
|
||||
|
|
@ -198,6 +187,9 @@ class Workstation extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 1;
|
||||
$this->isextrafieldmanaged = 0;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,17 +39,6 @@ class Hook extends CommonObject
|
|||
*/
|
||||
public $table_element = 'zapier_hook';
|
||||
|
||||
/**
|
||||
* @var int<0,1>|string Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table (example 'fk_soc@societe')
|
||||
*/
|
||||
public $ismultientitymanaged = 0;
|
||||
|
||||
/**
|
||||
* @var int Does hook support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for hook. Must be the part after the 'object_' into object_hook.png
|
||||
*/
|
||||
|
|
@ -257,6 +246,9 @@ class Hook extends CommonObject
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->ismultientitymanaged = 0;
|
||||
$this->isextrafieldmanaged = 1;
|
||||
|
||||
if (!getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid'])) {
|
||||
$this->fields['rowid']['visible'] = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user