<div dir="ltr">In addition to this, no module is using their Module/Module/Module.php - function get_activities. Only Products and Pricebooks are using this.<br><br>I think is old code?</div><div class="gmail_extra"><br><div class="gmail_quote">2015-01-08 13:19 GMT+01:00 PlaymaN Tepes <span dir="ltr"><<a href="mailto:sshhocckk@gmail.com" target="_blank">sshhocckk@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi vTiger Developer List,<br><br>Recently I tried to relate Products with Activities (like Accounts-Activities).<div><br></div><div>The problem is modules Products and Pricebooks have their own getQuery function </div><div>Products: <a href="http://trac.vtiger.com/svn/vtiger/vtigercrm/trunk/modules/Products/models/Relation.php" target="_blank">http://trac.vtiger.com/svn/vtiger/vtigercrm/trunk/modules/Products/models/Relation.php</a> Pricebooks: <a href="http://trac.vtiger.com/svn/vtiger/vtigercrm/trunk/modules/PriceBooks/models/Relation.php" target="_blank">http://trac.vtiger.com/svn/vtiger/vtigercrm/trunk/modules/PriceBooks/models/Relation.php</a></div><div><br></div><div>and Accounts is working through Vtiger Relation getQuery function: <a href="http://trac.vtiger.com/svn/vtiger/vtigercrm/trunk/modules/Vtiger/models/Relation.php" target="_blank">http://trac.vtiger.com/svn/vtiger/vtigercrm/trunk/modules/Vtiger/models/Relation.php</a><br><br>The problem in general terms is Pricebooks/Products getQuery functions is doing this: $query = $parentModuleModel->$functionName directly and Vtiger getQuery function call a function that have an exception in <a href="http://trac.vtiger.com/svn/vtiger/vtigercrm/trunk/modules/Accounts/models/Module.php" target="_blank">http://trac.vtiger.com/svn/vtiger/vtigercrm/trunk/modules/Accounts/models/Module.php</a> , function <span style="color:rgb(0,0,0);white-space:pre-wrap">getRelationQuery.</span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">So, I applied a patch, if someone is interested contact me.

Anyway I would like to know the approach to achieve this.

Thanks.</span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div></div>
</blockquote></div><br></div>