[Vtigercrm-developers] Cyclic vtlib relationships?

Joe Bordes joe at tsolucio.com
Thu Sep 20 00:20:59 PDT 2012


Hi Alan,

Each class has a method called vtlib_handler(), this method gets called 
on certain "install" events (to call them something). Exactly, I would 
say you are looking for the postinstall event of this method. That is 
where you can setup those relations that aren't established in the 
manifest file on import/export.
Basically the idea is that the manifest file is capable of establishing 
all elements related to the module being installed, but it cannot modify 
another module, so when you need your new module to appear (either as a 
uitype 10 field or a related list) on another module you have to do it 
in this method.

Give it a try and let us know how it goes.


On 19/09/12 16:24, Alan Lord wrote:
> Just a quick one.
>
> How do you deal with the situation where you have a couple of vtlib
> modules that need a bi-directional relationship?
>
> Early on I just ran the script to make the first, then ran the second,
> then ran the first *again* to create the linkages.
>
> Now I tend to split out the code to build the relationships and run it
> last (I have a set of files which create each module, then a few more to
> do "ancillary" stuff and make the relationships), but that doesn't seem
> to work right when I export a module; the relationships are not being
> created when I import...
>
> cheers
> Al
>
> _______________________________________________
> http://www.vtiger.com/
>


-- 
Un saludo
Joe
TSolucio



More information about the vtigercrm-developers mailing list