On 2016-10-12 06:10, Clemens Hupka wrote: > If i remember well, it worked this way (but i haven't tested it again) in > class Party: > > @classmethod > def search(cls, domain, offset=0, limit=None, order=None, count=False, > query=False): > newdom = [] > for item in domain: > if item[0]=="address": > newdom.append([u"address.zip"], item[1], item[2]) > else: > newdom.append(item) > return super(Party, cls).search(newdom, offset=offset, limit=limit, > order=order, count=count, query=query) > > In this case if you enter "address: put-zip-code-here" it should give you > all parties with this zip code...
Indeed it is not a good practice to override ModelStorage.search. And by the way, it is not needed because the rec_name search on address already search for zip (city and party). So if you put the addresses on the party list view (could be tree_invisible), you will be able to search with this filter: Addresses: <zip> Of course it could show you also party with a city containing the zip code. So if you really want to have strict search than you should search on the addresses but we do not have a relate to open the parties from there. I think this will be a good improvement. -- Cédric Krier - B2CK SPRL Email/Jabber: cedric.kr...@b2ck.com Tel: +32 472 54 46 59 Website: http://www.b2ck.com/ -- 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/20161012133735.GJ99626%40tetsuo.