<div dir="ltr"><div><div><div><div>Hello Joe,<br><br></div>Thanks for your tip with vtlib_handler(). That did the job.<br><br></div>I
created this simple module mainly as a way to better understand the
basics writing a custom module. It surely is not as extended as the one
you developed.<br>
<br></div>Regards,<br></div>Joel<br><br>---------- Forwarded message ----------<br>To: <a href="mailto:vtigercrm-developers@lists.vtigercrm.com" target="_blank">vtigercrm-developers@lists.vtigercrm.com</a><br>
Cc: <br>Date: Wed, 06 Nov 2013 22:39:16 +0100<br>Subject: Re: [Vtigercrm-developers] Packaging newly created module<br>
<div>Hi,<br>
<br>
The export process only registers information directly related
with the module. The related list you are adding is information
on the other module, not yours.<br>
To overcome this add your setRelatedList call in the
vtlib_handler() method of your module's main class.<br>
<br>
May I ask why you didn't use our payment module?<br>
<br>
Joe<br>
TSolucio<br>
<br>
<br>
El 06/11/13 22:22, Support Team TheEasyRef escribió:<br>
</div>
<div dir="ltr"> Hello,<br>
<br>
I have written a small module than enables to track payments of
accounts. Basically, it is a 1:m relationship with the account
module, i.e. one account can have multiple payment tracking
entities. The idea is that I can have my payment tracking module
appear as a related list under the accounts (organisations),
just like other modules as quotes, projects, products etc ...<br>
<br>
I used vtlib to create a script for the installation. For
configuring the relationship I use the get_dependents_list
function as mentioned by Joe Bordes at <a href="http://www.crmevolutivo.com/doku.php/es:vtlibrelated" rel="nofollow" target="_blank">http://www.crmevolutivo.com/doku.php/es:vtlibrelated</a><br>
<br>
concretely the code for this is :<br>
$module->setRelatedList(Vtiger_Module::getInstance('Accounts'),
'Payment tracking',Array('ADD'),'get_dependents_list');<br>
<br>
this will correctly update the vtiger_relatedlists table with an
extra record.<br>
<br>
So the script works perfectly with no problem. However, when I
want to export the new module, and install it on a new <span>vtiger</span>
instance, I am loosing the relationship. This means that the
payment tracking will not appear as a related list in the
accounts. After checking, I found out that the import of the zip
package will not update the vtiger_relatedlists table.<br>
<br>
Any idea why the export process is not working smoothly?<br>
<br>
Thanks,<br>
Joel </div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
<a href="http://www.vtiger.com/" target="_blank">http://www.<span>vtiger</span>.com/</a></pre></div>