Hi,

I found a very old thread on this, but it seems all the docs covering this 
have disappeared.

So, in order to search parties by zip code, i need to make a function field 
for the party and a function field searcher function?
Is there an example i can have a look?

The other idea would be to do something like this:

def search_rec_name(cls, name, clause):
    domain = super(Party, cls).search_rec_name(name, clause)
    Address = Pool().get("party.address")
    addresses = Address.search([("zip", "=", clause[2]), ("active", "=", True)])
    parties = [address.party.id for address in addresses]
    domain.append(("id", "in" parties))


Anyone has the same implemented?
Party lookup by zip code is a very important demand at the company i work 
for...

best regards,
simon

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/6ed8a268-0291-4974-a74f-ad887e7fe34b%40googlegroups.com.

Reply via email to