Hello all,

    It is a good point to introduce a dictionary structure into
Dolibarr, but I feel a different and more global way.

    I will prefer get this informations from tables rather than in a PHP
file. Table "Object" with field "Class name","Class path", .... a table
"Object_field" with field "name", "type","table_FK", "etc...",  " as it
is done more or less into object_extrafields table.
    An auto-descritif table models will be a very nice improvement and
open gate to lot's of time reduction in dev.

    Why store this into database rather than PHP file ? Because tomorrow
Python application can read object structure from DB, not from PHP file.

    Anyway, it is a good at least a good start, and as Laurent says
"step by step".

Regards
   

Florian Henry
+33 6 03 76 48 07
[email protected]
http://www.open-concept.pro
Twitter : @_Open_Concept_
Google+ : https://www.google.com/+Open-conceptPro

Le 23/10/2015 21:36, Frédéric FRANCE a écrit :
> Hi all
> I have posted thid PR: https://github.com/Dolibarr/dolibarr/pull/3796
> Including this in external modules may help to fight the db name
> change(or triggers) and to reduce anxiolitic eating for developpers
> you can do
> $sql = "SELECT * FROM ".MAIN_DB_PREFIX.TABLE_THIRDPARTY;
> $sql .= " WHERE ".THIRDPARTY_FK_SOC." = ".$object->id;
> in place of knowing the right name of past and future dolibarr version
>
> Feel free to comment and populate the file if you think it's right
> No need to check version if the file is correctly maintained
>
> With best regards
> Frederic FRANCE
>
> _______________________________________________
> Dolibarr-dev mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/dolibarr-dev



_______________________________________________
Dolibarr-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev

Répondre à