[Vtigercrm-developers] Product/Service popup list all records in custom Invertory module
Alan Lord
alanslists at gmail.com
Mon Oct 13 08:09:38 GMT 2014
On 13/10/14 08:51, IT-Solutions4You wrote:
> We want to create a Invertory module for vtiger 6.1. There is one issue,
> the Product/Service popup show all records (not only active).
> The solution is change array in utils.php function getInventoryModules,
> but yes this is not "compatible" solution.
Not sure if this completely answers your question but you can override
the Popup and associated functions in your module. (Edit, Detail and
RelatedList.js)
See my thread earlier this month:
http://lists.vtigercrm.com/pipermail/vtigercrm-developers/2014-October/029943.html
I made two small changes to the standard PopupSearch.tpl (in
layouts/vlayout/modules/Vtiger (I suggested these changes should be
added to vtiger as they have no adverse effects - but it seemed to have
fallen on "deaf ears"):
> Add a test for SEARCH_VALUE and populate the search box
>><input class="span2" type="text" placeholder="{vtranslate('LBL_TYPE_SEARCH')}" {if $SEARCH_VALUE} value="{$SEARCH_VALUE}" {/if} id="searchvalue"/>
>
> Add a test for SEARCH_KEY and select the right fieldname in the Select:
>
>><option value="{$fieldName}" {if $fieldName eq $defaultSearchField} selected {/if}{if $fieldName eq $SEARCH_KEY} selected {/if}>{vtranslate($fieldObject->get('label'),$MODULE)}</option>
Then, by overriding the above mentioned javascript files in your module
you can set a filter to limit what is displayed.
HTH
Al
More information about the vtigercrm-developers
mailing list