Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2972 Prikazi

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
Opusti

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

Related Posts Odgovori Prikazi Aktivnost
4
jan. 24
13920
1
mar. 15
6713
2
dec. 23
18525
3
jun. 24
3573
2
jul. 21
7059