désolé je le fait en français :

tu as besoin d'un champ entité sur toutes les tables des objets
principaux (le lien avec la table llx_societe ou llx_socpeople ne compte
pas)
mais par contre tu n'as pas besoin de l'ajouter sur la ou les tables de
détails de cette objet si cette table est liée avec la clé étrangère de
cette objet

exemple :

llx_facture contient un champ entity
mais llx_facturedet non car liée via fk_facture

lorsque tu as un index unique :

UNIQUE INDEX (code)

tu dois rajouter le champ entity

UNIQUE INDEX (code, entity)

pour autoriser les doublons entre entité

lors d'un create() tu dois avoir un "global $conf" et tu utilises
"$conf->entity" pour remplir ce champ


Le 28/08/12 11:31, Marc-Henri Pamiseux a écrit :
> Hi Régis,
>
> You mean that if i create a table that is linked with the llx_societe
> table or with the llx_socpeople table, then it isn't necessary to add
> the entity column in the created table.
>
> But if the table is not created in connection with a table containing
> the column entity, then it is necessary to add that column in my table
> definition.
>
> To be valid, there must be an SQL constraint binding the tables,
> otherwise the link between tables is not an obligation.
>
> To be valid, there must be an SQL constraint binding the tables,
> otherwise the link between tables is not an obligation. Otherwise, the
> created table must contain the entity column.
>
> Is it what you mean ?
>
> Le 28/08/2012 09:59, Régis Houssin a écrit :
>> you can add "entity" field for multicompany module in object table but
>> not in detail table (already linked with foreign key)
> Hope to read you,
>
>
> _______________________________________________
> Dolibarr-dev mailing list
> Dolibarr-dev@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/dolibarr-dev

Cordialement,
-- 
Régis Houssin
---------------------------------------------------------
Cap-Networks
Cidex 1130
34, route de Gigny
71240 MARNAY
FRANCE
VoIP: +33 1 83 62 40 03
GSM: +33 6 33 02 07 97
Web: http://www.cap-networks.com/
Email: regis.hous...@cap-networks.com

Dolibarr developer: re...@dolibarr.fr
Web Portal: http://www.dolibarr.fr/
SaaS offers: http://www.dolibox.fr/
Shop: http://www.dolistore.com/
Development platform: https://doliforge.org/
---------------------------------------------------------

_______________________________________________
Dolibarr-dev mailing list
Dolibarr-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev

Répondre à