This is because email on party.party is a Function field so you need to
write a "searcher" function first for this field before you can search on
it...


2012/7/2 jmartin <jmar...@zikzakmedia.com>

> Hi,
>
> I'm trying to override the search_rec_name function of party.party to
> allow searching parties with its emails, but when I try to execute it,
> tryton returns me this message: "search_function_missing". The function is:
>
>     def search_rec_name(self, name, clause):
>         ids = self.search([('email',) + clause[1:]], order=[])
>         if ids:
>             ids += self.search([('name',) + clause[1:]], order=[])
>             return [('id', 'in', ids)]
>         return super(Party, self).search_rec_name(name, clause)
>
> I tried to look at this link
>
> Look at
>> http://www.tryton.org/doc/**branches/1.0/trytond/doc/**
>> models.html#search-on-**function-fields<http://www.tryton.org/doc/branches/1.0/trytond/doc/models.html#search-on-function-fields>
>>
> but it doesn't work. Could anyone say me what I'm doing wrong?
>
>
>
> --
> tryton@googlegroups.com mailing list
>

-- 
tryton@googlegroups.com mailing list

Reply via email to