mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Define CommonObject relation in CommonObjectLine classes (#29956)
This commit is contained in:
parent
288e08a2e3
commit
abcb1dad4b
|
|
@ -1670,6 +1670,16 @@ class BOMLine extends CommonObjectLine
|
|||
*/
|
||||
public $table_element = 'bom_bomline';
|
||||
|
||||
/**
|
||||
* @see CommonObjectLine
|
||||
*/
|
||||
public $parent_element = 'bom';
|
||||
|
||||
/**
|
||||
* @see CommonObjectLine
|
||||
*/
|
||||
public $fk_parent_attribute = 'fk_bom';
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for bomline. Must be the part after the 'object_' into object_bomline.png
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -3975,6 +3975,16 @@ class PropaleLigne extends CommonObjectLine
|
|||
*/
|
||||
public $table_element = 'propaldet';
|
||||
|
||||
/**
|
||||
* @see CommonObjectLine
|
||||
*/
|
||||
public $parent_element = 'propal';
|
||||
|
||||
/**
|
||||
* @see CommonObjectLine
|
||||
*/
|
||||
public $fk_parent_attribute = 'fk_propal';
|
||||
|
||||
public $oldline;
|
||||
|
||||
// From llx_propaldet
|
||||
|
|
|
|||
|
|
@ -2143,6 +2143,16 @@ class FactureLigneRec extends CommonInvoiceLine
|
|||
*/
|
||||
public $table_element = 'facturedet_rec';
|
||||
|
||||
/**
|
||||
* @see CommonObjectLine
|
||||
*/
|
||||
public $parent_element = 'facturerec';
|
||||
|
||||
/**
|
||||
* @see CommonObjectLine
|
||||
*/
|
||||
public $fk_parent_attribute = 'fk_facture';
|
||||
|
||||
//! From llx_facturedet_rec
|
||||
//! Id facture
|
||||
public $fk_facture;
|
||||
|
|
|
|||
|
|
@ -3009,6 +3009,16 @@ class ContratLigne extends CommonObjectLine
|
|||
*/
|
||||
public $table_element = 'contratdet';
|
||||
|
||||
/**
|
||||
* @see CommonObjectLine
|
||||
*/
|
||||
public $parent_element = 'contrat';
|
||||
|
||||
/**
|
||||
* @see CommonObjectLine
|
||||
*/
|
||||
public $fk_parent_attribute = 'fk_contrat';
|
||||
|
||||
/**
|
||||
* @var string Name to use for 'features' parameter to check module permissions user->rights->feature with restrictedArea().
|
||||
* Undefined means same value than $element. Can be use to force a check on another element for example for class of line, we mention here the parent element.
|
||||
|
|
|
|||
|
|
@ -33,6 +33,16 @@
|
|||
*/
|
||||
abstract class CommonObjectLine extends CommonObject
|
||||
{
|
||||
/**
|
||||
* @var string ID to identify parent CommonObject type (element name)
|
||||
*/
|
||||
public $parent_element = '';
|
||||
|
||||
/**
|
||||
* @var string Attribute related to parent CommonObject rowid (many2one)
|
||||
*/
|
||||
public $fk_parent_attribute = '';
|
||||
|
||||
/**
|
||||
* Id of the line
|
||||
* @var int
|
||||
|
|
|
|||
|
|
@ -2656,6 +2656,15 @@ class ExpeditionLigne extends CommonObjectLine
|
|||
*/
|
||||
public $table_element = 'expeditiondet';
|
||||
|
||||
/**
|
||||
* @see CommonObjectLine
|
||||
*/
|
||||
public $parent_element = 'expedition';
|
||||
|
||||
/**
|
||||
* @see CommonObjectLine
|
||||
*/
|
||||
public $fk_parent_attribute = 'fk_expedition';
|
||||
|
||||
/**
|
||||
* Id of the line. Duplicate of $id.
|
||||
|
|
|
|||
|
|
@ -3741,6 +3741,16 @@ class CommandeFournisseurLigne extends CommonOrderLine
|
|||
*/
|
||||
public $table_element = 'commande_fournisseurdet';
|
||||
|
||||
/**
|
||||
* @see CommonObjectLine
|
||||
*/
|
||||
public $parent_element = 'commande_fournisseur';
|
||||
|
||||
/**
|
||||
* @see CommonObjectLine
|
||||
*/
|
||||
public $fk_parent_attribute = 'fk_commande_fournisseur';
|
||||
|
||||
public $oldline;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -3732,6 +3732,16 @@ class SupplierInvoiceLine extends CommonObjectLine
|
|||
*/
|
||||
public $table_element = 'facture_fourn_det';
|
||||
|
||||
/**
|
||||
* @see CommonObjectLine
|
||||
*/
|
||||
public $parent_element = 'facture_fourn';
|
||||
|
||||
/**
|
||||
* @see CommonObjectLine
|
||||
*/
|
||||
public $fk_parent_attribute = 'fk_facture_fourn';
|
||||
|
||||
/**
|
||||
* @var static
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -52,6 +52,16 @@ class EvaluationLine extends CommonObjectLine
|
|||
*/
|
||||
public $table_element = 'hrm_evaluationdet';
|
||||
|
||||
/**
|
||||
* @see CommonObjectLine
|
||||
*/
|
||||
public $parent_element = 'hrm_evaluation';
|
||||
|
||||
/**
|
||||
* @see CommonObjectLine
|
||||
*/
|
||||
public $fk_parent_attribute = 'fk_evaluation';
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for evaluationdet. Must be the part after the 'object_' into object_evaluationdet.png
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -50,6 +50,16 @@ class Skilldet extends CommonObjectLine
|
|||
*/
|
||||
public $table_element = 'hrm_skilldet';
|
||||
|
||||
/**
|
||||
* @see CommonObjectLine
|
||||
*/
|
||||
public $parent_element = 'skill';
|
||||
|
||||
/**
|
||||
* @see CommonObjectLine
|
||||
*/
|
||||
public $fk_parent_attribute = 'fk_skill';
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for skilldet. Must be the part after the 'object_' into object_skilldet.png
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1250,6 +1250,18 @@ class MyObjectLine extends CommonObjectLine
|
|||
// To complete with content of an object MyObjectLine
|
||||
// We should have a field rowid, fk_myobject and position
|
||||
|
||||
/**
|
||||
* To overload
|
||||
* @see CommonObjectLine
|
||||
*/
|
||||
public $parent_element = '';
|
||||
|
||||
/**
|
||||
* To overload
|
||||
* @see CommonObjectLine
|
||||
*/
|
||||
public $fk_parent_attribute = '';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
|
|
|||
|
|
@ -2001,6 +2001,16 @@ class MoLine extends CommonObjectLine
|
|||
*/
|
||||
public $table_element = 'mrp_production';
|
||||
|
||||
/**
|
||||
* @see CommonObjectLine
|
||||
*/
|
||||
public $parent_element = 'mo';
|
||||
|
||||
/**
|
||||
* @see CommonObjectLine
|
||||
*/
|
||||
public $fk_parent_attribute = 'fk_mo';
|
||||
|
||||
/**
|
||||
* 'type' field format:
|
||||
* 'integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter[:Sortfield]]]',
|
||||
|
|
|
|||
|
|
@ -800,6 +800,16 @@ class InventoryLine extends CommonObjectLine
|
|||
*/
|
||||
public $table_element = 'inventorydet';
|
||||
|
||||
/**
|
||||
* @see CommonObjectLine
|
||||
*/
|
||||
public $parent_element = 'inventory';
|
||||
|
||||
/**
|
||||
* @see CommonObjectLine
|
||||
*/
|
||||
public $fk_parent_attribute = 'fk_inventory';
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for inventory
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -2815,6 +2815,16 @@ class SupplierProposalLine extends CommonObjectLine
|
|||
*/
|
||||
public $table_element = 'supplier_proposaldet';
|
||||
|
||||
/**
|
||||
* @see CommonObjectLine
|
||||
*/
|
||||
public $parent_element = 'supplier_proposal';
|
||||
|
||||
/**
|
||||
* @see CommonObjectLine
|
||||
*/
|
||||
public $fk_parent_attribute = 'fk_supplier_proposal';
|
||||
|
||||
public $oldline;
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user