Skip to Content
Menu
This question has been flagged
3061 Views

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
Discard

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

Related Posts Replies Views Activity
4
Jan 24
14003
1
Mar 15
6788
2
Dec 23
18595
3
Jun 24
3668
2
Jul 21
7133