On Mon, Oct 26, 2015 at 4:00 PM, Florian HENRY <
florian.he...@open-concept.pro> wrote:

> Hello,
>
>     IMHO create a new table with fk_product column. Core dolibarr tables
> should be modified by modules, it is the base of core application. If core
> tables modification is needed, it should be submitted into core dev, for
> fixing bugs, or adding new core feature but not by externals modules.
>     As well, in the module you should deal with triggers PRODUCT_DELETE to
> delete line into this table in the same times product are deleted from
> dolibarr (can also be done by foreign key ON DELETE contraint but may not
> work on all database engine) to avoid orphan lines.
>     Another option is also to play with extrafields
> (llx_product_extrafields) feature by declaring them by code into module
> initialisation. It can depends how complex will be the functionnal rules on
> this fields.
>
> Regards
>
>
Ok, got it. Many thanks for the comment. I was also thinking of doing it as
a separate table is the best solution. Will make some tests and see how it
comes out.

Rgds
Saxa

>
>
> Florian Henry+33 6 03 76 48 
> 07florian.henry@open-concept.prohttp://www.open-concept.pro
> Twitter : @_Open_Concept_
> Google+ : https://www.google.com/+Open-conceptPro
>
> Le 26/10/2015 17:34, Sasa Ostrouska a écrit :
>
> Hello, I have finally start to develop a specific module for the taxes we
> have in Brasil. So as a first step I need to add few fields to the products
> table as I want to have the possibility to show the various taxes and its
> amount when you will click on a tab showed in the product file.
>
> So the question goes, what is better to do , adding an additional mysql
> table
> like llx_brasil_ncm_product_tax and then linking those values with each
> product
>
> or
>
> extend the existing llx_product in dolibarr and add fiew fields ?
>
> Rgds
> Saxa
>
>
> _______________________________________________
> Dolibarr-dev mailing 
> listDolibarr-dev@nongnu.orghttps://lists.nongnu.org/mailman/listinfo/dolibarr-dev
>
>
>
> _______________________________________________
> Dolibarr-dev mailing list
> Dolibarr-dev@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/dolibarr-dev
>
>
_______________________________________________
Dolibarr-dev mailing list
Dolibarr-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev

Répondre à