[Vtigercrm-developers] Request for 6.2 (Popup filtering)

Alan Lord alanslists at gmail.com
Fri Oct 17 12:12:24 GMT 2014


On 17/10/14 12:43, Prasad wrote:
> I would like to understand a little more in details.
>
> Consider working with a Contact and you want to add Products (n:n) - can
> you suggest your enhancement related to this?
>

That's probably not a very good example but here we go...

Maybe you have a field (probably a Picklist) on Products called 
something like "Market" which is used to indicate the Market (territory) 
in which this product can be sold.

The Contact also has the same Picklist to indicate which Market he lives in.

In this scenario there is no point in showing Products for a Market 
where he cannot buy them... In fact it could be very dangerous if you 
are in America and your customer is in Syria or North Korea ;-)

For a real-use case:

I have a module called "Gifts". These are a bit like products in a way 
but much simpler. They are offered by certain organisations (A Resort 
Hotel) only; sometimes just by one, sometimes by a few in the Resort 
chain (Think like Holiday Inn)... So it's a n:n relationship.

In another Custom module which describes a Short Vacation package, we 
have a UI10 to the same Organisation (Resort) as the destination for 
their vacation. We want to record the Gifts that are given to the client 
as an incentive for them to come to the Resort. When selecting the Gifts 
available, we only want to see those that are available from that Resort...

Hope that makes sense and in fact, I have just retested something and 
setting the "related_parent_module" and "related_parent_id" does 
actually work! :-)

For get_related_list relations this requires no core hacks for a custom 
module (overrides done in Detail.js & RelatedList.js files)...


For get_dependents_list I still think we need to add the text to the 
search field and set the Popup so it is obvious to the user why the list 
is limited. This clearly can't be done in a n:n relationship as it is 
not filtered by a field's content...

Cheers

Al




More information about the vtigercrm-developers mailing list