Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2969 Weergaven

Hi everyone

I have function search :

when _cat=22011 :

 for _cat in _catstring:
            if _cat in ['W','H']:
                continue
            if len(_cat)<=3:
                continue
            _query_catstring_oj=self.pool.get('product.category')
            _query_catstring_ids=_query_catstring_oj.search(cr,uid,[('name', '=' ,_cat)])
            ...........

results is null But I edit

   _query_catstring_ids=_query_catstring_oj.search(cr,uid,[('name', '=' ,_cat)])

by

 _query_catstring_ids=_query_catstring_oj.search(cr,uid,[('name', '=' ,'2011')])

result is list object

can you help me ? thanks hungnt

Avatar
Annuleer

Search method always return list of Ids. Make sure domain is correct what you are searching for.

Gerelateerde posts Antwoorden Weergaven Activiteit
4
jan. 24
13908
1
mrt. 15
6712
2
dec. 23
18521
3
jun. 24
3560
2
jul. 21
7050