<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>

<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML con formato previo Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Texto de globo Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.HTMLconformatoprevioCar
        {mso-style-name:"HTML con formato previo Car";
        mso-style-priority:99;
        mso-style-link:"HTML con formato previo";
        font-family:Consolas;}
span.EstiloCorreo19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.TextodegloboCar
        {mso-style-name:"Texto de globo Car";
        mso-style-priority:99;
        mso-style-link:"Texto de globo";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="2050" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=ES link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Very well explained, thank you!<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=300
 style='width:225.0pt'>
 <tr style='height:45.75pt'>
  <td width=85 style='width:63.75pt;padding:0cm 0cm 3.75pt 0cm;height:45.75pt'>
  <p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial","sans-serif";
  color:#1F497D'><img width=61 height=61 id="_x0000_i1033"
  src="cid:image001.png@01CEDBD4.EF3C76F0" alt="Refineria Web"></span><span
  style='font-size:10.5pt;font-family:"Arial","sans-serif";color:#1F497D'><o:p></o:p></span></p>
  </td>
  <td style='padding:0cm 0cm 3.75pt 0cm;height:45.75pt'>
  <p class=MsoNormal style='line-height:13.5pt'><b><span style='font-size:10.5pt;
  font-family:"Arial","sans-serif";color:#315047'>Adrián Granado </span></b><span
  style='font-size:10.5pt;font-family:"Arial","sans-serif";color:#1F497D'><br>
  </span><span style='font-size:10.5pt;font-family:"Arial","sans-serif";
  color:#7CCEE2'>PROGRAMADOR </span><span style='font-size:10.5pt;font-family:
  "Arial","sans-serif";color:#1F497D'><br>
  <a href="mailto:%20adrian@refineriaweb.com"><span style='color:#315047;
  text-decoration:none'>adrian@refineriaweb.com </span></a><o:p></o:p></span></p>
  </td>
 </tr>
</table>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D;display:none'><o:p> </o:p></span></p>

<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=250
 style='width:187.5pt'>
 <tr>
  <td width=19 style='width:14.25pt;padding:0cm 0cm 0cm 0cm'></td>
  <td style='border:none;border-right:solid white 1.0pt;background:#7CCEE2;
  padding:5.25pt 0cm 5.25pt 7.5pt'>
  <p class=MsoNormal style='line-height:13.5pt'><span style='font-size:9.0pt;
  font-family:"Arial","sans-serif";color:white'>C/ Gran Vía Asima, 20 - 2º
  Oficina 7<o:p></o:p></span></p>
  <p class=MsoNormal style='line-height:13.5pt'><span style='font-size:9.0pt;
  font-family:"Arial","sans-serif";color:white'>07009 Palma de Mallorca<br>
  Teléfono 971 72 98 83 – Ext. 511<br>
  Fax 971 780 391 <o:p></o:p></span></p>
  </td>
 </tr>
 <tr>
  <td colspan=2 style='padding:0cm 0cm 0cm 0cm'>
  <p class=MsoNormal><a href="http://www.refineriaweb.com/" target="_blank"><span
  style='font-size:9.0pt;font-family:"Arial","sans-serif";text-decoration:none'><img
  border=0 width=268 height=30 id="_x0000_i1032"
  src="cid:image002.png@01CEDBD4.EF3C76F0" alt="Refineria Web"></span></a><span
  style='font-size:9.0pt;font-family:"Arial","sans-serif";color:white'><o:p></o:p></span></p>
  </td>
 </tr>
</table>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D;display:none'><o:p> </o:p></span></p>

<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=189
 style='width:5.0cm'>
 <tr>
  <td width=137 style='width:102.75pt;padding:0cm 0cm 0cm 0cm'></td>
  <td style='padding:0cm 0cm 0cm 0cm'>
  <p class=MsoNormal style='margin-top:2.25pt'><a
  href="https://www.facebook.com/refineriaweb1" target="_blank"><span
  style='font-size:11.0pt;font-family:"Calibri","sans-serif";text-decoration:
  none'><img border=0 width=21 height=21 id="_x0000_i1031"
  src="cid:image003.png@01CEDBD4.EF3C76F0" alt="Siguenos en Facebook"></span></a><a
  href="https://twitter.com/refineriaweb" target="_blank"><span
  style='font-size:11.0pt;font-family:"Calibri","sans-serif";text-decoration:
  none'><img border=0 width=21 height=21 id="_x0000_i1029"
  src="cid:image004.png@01CEDBD4.EF3C76F0" alt="Siguenos en Twitter"></span></a><span
  style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p>
  </td>
 </tr>
</table>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>De:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
vtigercrm-developers-bounces@lists.vtigercrm.com
[mailto:vtigercrm-developers-bounces@lists.vtigercrm.com] <b>En nombre de </b>Support
Team TheEasyRef<br>
<b>Enviado el:</b> jueves, 07 de noviembre de 2013 15:27<br>
<b>Para:</b> vtigercrm-developers@lists.vtigercrm.com<br>
<b>Asunto:</b> Re: [Vtigercrm-developers] Packaging newly created module<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p> </o:p></p>

<div>

<div>

<div>

<div>

<div>

<div>

<div>

<div>

<div>

<div>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'>Hello Adrian,<o:p></o:p></p>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'>If you look at page 17 in vtlib
documentation (mentioned as "step 5"), you need to add to your
installation script the relation between your module and the others. See also
the extensive explanation of joe bordes (link in my original mail hereunder).
Concretely, you will add something like that:<br>
$module->setRelatedList(Vtiger_Module::getInstance('Accounts'), 'Payment
tracking',Array('ADD'),'get_dependents_list');<o:p></o:p></p>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'>this create a relation of the
new module with the one of the account. This instruction will create a record
in the relatedlists table as already explained.<o:p></o:p></p>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'>However, as joe bordes
explained, when exporting the module it will not be able to have the
relationship extracted because this is something at the account module level.<o:p></o:p></p>

</div>

<p class=MsoNormal>Assuming my new module is called PaymentML, go to
PaymentML.php and add the relationship instruction
$module->setRelatedList(Vtiger_Module::getInstance('Accounts'), 'Payment
tracking',Array('ADD'),'get_dependents_list');<o:p></o:p></p>

</div>

<p class=MsoNormal>to the function vtlib_handler:<br>
<br>
    function vtlib_handler($modulename, $event_type) {<br>
        if($event_type == 'module.postinstall') {<br>
            // TODO Handle post
installation actions<o:p></o:p></p>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'>           
!!relation command goes here!!<o:p></o:p></p>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'>This will create the
relationship in the table immediately after the module is installed.<o:p></o:p></p>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'>I hope that clears up.<o:p></o:p></p>

</div>

<p class=MsoNormal>Regards,<o:p></o:p></p>

</div>

<p class=MsoNormal>Joel<o:p></o:p></p>

<div>

<div>

<div>

<div>

<div>

<div>

<p class=MsoNormal><o:p> </o:p></p>

</div>

</div>

</div>

</div>

</div>

</div>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p>

<div>

<p class=MsoNormal>On Thu, Nov 7, 2013 at 3:51 PM, <<a
href="mailto:vtigercrm-developers-request@lists.vtigercrm.com" target="_blank">vtigercrm-developers-request@lists.vtigercrm.com</a>>
wrote:<o:p></o:p></p>

<p class=MsoNormal>Send vtigercrm-developers mailing list submissions to<br>
        <a
href="mailto:vtigercrm-developers@lists.vtigercrm.com">vtigercrm-developers@lists.vtigercrm.com</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a
href="http://lists.vtigercrm.com/cgi-bin/mailman/listinfo/vtigercrm-developers"
target="_blank">http://lists.vtigercrm.com/cgi-bin/mailman/listinfo/vtigercrm-developers</a><br>
<br>
or, via email, send a message with subject or body 'help' to<br>
        <a
href="mailto:vtigercrm-developers-request@lists.vtigercrm.com">vtigercrm-developers-request@lists.vtigercrm.com</a><br>
<br>
You can reach the person managing the list at<br>
        <a
href="mailto:vtigercrm-developers-owner@lists.vtigercrm.com">vtigercrm-developers-owner@lists.vtigercrm.com</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of vtigercrm-developers digest..."<br>
<br>
Today's Topics:<br>
<br>
   1. Re: Packaging newly created module (Support Team TheEasyRef)<br>
   2. Re: Packaging newly created module<br>
      (Adri?n Granado - Refineria Web)<br>
<br>
<br>
---------- Forwarded message ----------<br>
From: Support Team TheEasyRef <<a href="mailto:support@theeasyref.com">support@theeasyref.com</a>><br>
To: <a href="mailto:vtigercrm-developers@lists.vtigercrm.com">vtigercrm-developers@lists.vtigercrm.com</a><br>
Cc: <br>
Date: Thu, 7 Nov 2013 15:15:16 +0200<br>
Subject: Re: [Vtigercrm-developers] Packaging newly created module<o:p></o:p></p>

<div>

<div>

<div>

<div>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'>Hello Joe,<o:p></o:p></p>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'>Thanks for your tip with
vtlib_handler(). That did the job.<o:p></o:p></p>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'>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.<o:p></o:p></p>

</div>

<p class=MsoNormal>Regards,<o:p></o:p></p>

</div>

<p class=MsoNormal>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<o:p></o:p></p>

<div>

<p class=MsoNormal>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ó:<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>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"
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 vtiger 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 <o:p></o:p></p>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p>

<pre>_______________________________________________<o:p></o:p></pre><pre><a
href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><o:p></o:p></pre></div>

<p class=MsoNormal><br>
<br>
---------- Forwarded message ----------<br>
From: "Adrián Granado - Refineria Web" <<a
href="mailto:adrian@refineriaweb.com">adrian@refineriaweb.com</a>><br>
To: <<a href="mailto:vtigercrm-developers@lists.vtigercrm.com">vtigercrm-developers@lists.vtigercrm.com</a>><br>
Cc: <br>
Date: Thu, 7 Nov 2013 14:51:19 +0100<br>
Subject: Re: [Vtigercrm-developers] Packaging newly created module<o:p></o:p></p>

<div>

<div>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Can you explain more how you resolve the problem?<br>
<br>
Thanks!</span><o:p></o:p></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'> </span><o:p></o:p></p>

<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=300
 style='width:225.0pt'>
 <tr style='height:45.75pt'>
  <td width=85 style='width:63.75pt;padding:0cm 0cm 3.75pt 0cm;height:45.75pt'>
  <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
  style='font-size:10.5pt;font-family:"Arial","sans-serif";color:#1F497D'><img
  border=0 width=61 height=61 id="_x0000_i1025"
  src="cid:image001.png@01CEDBD4.EF3C76F0" alt="Refineria Web"></span><o:p></o:p></p>
  </td>
  <td style='padding:0cm 0cm 3.75pt 0cm;height:45.75pt'>
  <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
  line-height:13.5pt'><b><span style='font-size:10.5pt;font-family:"Arial","sans-serif";
  color:#315047'>Adrián Granado </span></b><span style='font-size:10.5pt;
  font-family:"Arial","sans-serif";color:#1F497D'><br>
  </span><span style='font-size:10.5pt;font-family:"Arial","sans-serif";
  color:#7CCEE2'>PROGRAMADOR </span><span style='font-size:10.5pt;font-family:
  "Arial","sans-serif";color:#1F497D'><br>
  <a href="mailto:%20adrian@refineriaweb.com" target="_blank"><span
  style='color:#315047;text-decoration:none'>adrian@refineriaweb.com </span></a></span><o:p></o:p></p>
  </td>
 </tr>
</table>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p>

<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=250
 style='width:187.5pt'>
 <tr>
  <td width=19 style='width:14.25pt;padding:0cm 0cm 0cm 0cm'></td>
  <td style='border:none;border-right:solid white 1.0pt;background:#7CCEE2;
  padding:5.25pt 0cm 5.25pt 7.5pt'>
  <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
  line-height:13.5pt'><span style='font-size:9.0pt;font-family:"Arial","sans-serif";
  color:white'>C/ Gran Vía Asima, 20 - 2º Oficina 7</span><o:p></o:p></p>
  <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
  line-height:13.5pt'><span style='font-size:9.0pt;font-family:"Arial","sans-serif";
  color:white'>07009 Palma de Mallorca<br>
  Teléfono 971 72 98 83 – Ext. 511<br>
  Fax 971 780 391 </span><o:p></o:p></p>
  </td>
 </tr>
 <tr>
  <td colspan=2 style='padding:0cm 0cm 0cm 0cm'>
  <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><a
  href="http://www.refineriaweb.com/" target="_blank"><span style='font-size:
  9.0pt;font-family:"Arial","sans-serif";text-decoration:none'><img border=0
  width=268 height=30 id="_x0000_i1026" src="cid:image002.png@01CEDBD4.EF3C76F0"
  alt="Refineria Web"></span></a><o:p></o:p></p>
  </td>
 </tr>
</table>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p>

<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=189
 style='width:5.0cm'>
 <tr>
  <td width=137 style='width:102.75pt;padding:0cm 0cm 0cm 0cm'></td>
  <td style='padding:0cm 0cm 0cm 0cm'>
  <p class=MsoNormal style='margin-top:2.25pt;mso-margin-bottom-alt:auto'><a
  href="https://www.facebook.com/refineriaweb1" target="_blank"><span
  style='font-size:11.0pt;font-family:"Calibri","sans-serif";text-decoration:
  none'><img border=0 width=21 height=21 id="_x0000_i1027"
  src="cid:image003.png@01CEDBD4.EF3C76F0" alt="Siguenos en Facebook"></span></a><a
  href="https://twitter.com/refineriaweb" target="_blank"><span
  style='font-size:11.0pt;font-family:"Calibri","sans-serif";text-decoration:
  none'><img border=0 width=21 height=21 id="_x0000_i1028"
  src="cid:image004.png@01CEDBD4.EF3C76F0" alt="Siguenos en Twitter"></span></a><o:p></o:p></p>
  </td>
 </tr>
</table>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>De:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> <a
href="mailto:vtigercrm-developers-bounces@lists.vtigercrm.com" target="_blank">vtigercrm-developers-bounces@lists.vtigercrm.com</a>
[mailto:<a href="mailto:vtigercrm-developers-bounces@lists.vtigercrm.com"
target="_blank">vtigercrm-developers-bounces@lists.vtigercrm.com</a>] <b>En
nombre de </b>Support Team TheEasyRef<br>
<b>Enviado el:</b> jueves, 07 de noviembre de 2013 14:15<br>
<b>Para:</b> <a href="mailto:vtigercrm-developers@lists.vtigercrm.com"
target="_blank">vtigercrm-developers@lists.vtigercrm.com</a><br>
<b>Asunto:</b> Re: [Vtigercrm-developers] Packaging newly created module</span><o:p></o:p></p>

</div>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p>

<div>

<div>

<div>

<div>

<div>

<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'>Hello
Joe,<o:p></o:p></p>

</div>

<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'>Thanks
for your tip with vtlib_handler(). That did the job.<o:p></o:p></p>

</div>

<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'>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.<o:p></o:p></p>

</div>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Regards,<o:p></o:p></p>

</div>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>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<o:p></o:p></p>

<div>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>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ó:<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>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"
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 vtiger 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 <o:p></o:p></p>

</div>

<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'> <o:p></o:p></p>

<pre>_______________________________________________<o:p></o:p></pre><pre><a
href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><o:p></o:p></pre></div>

</div>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'><br>
_______________________________________________<br>
vtigercrm-developers mailing list<br>
<a href="mailto:vtigercrm-developers@lists.vtigercrm.com">vtigercrm-developers@lists.vtigercrm.com</a><br>
<a
href="http://lists.vtigercrm.com/cgi-bin/mailman/listinfo/vtigercrm-developers"
target="_blank">http://lists.vtigercrm.com/cgi-bin/mailman/listinfo/vtigercrm-developers</a><o:p></o:p></p>

</div>

<p class=MsoNormal><o:p> </o:p></p>

</div>

</div>

</div>

</body>

</html>