Skip to Content
Menú
This question has been flagged
2921 Vistes

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
Descartar

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

Related Posts Respostes Vistes Activitat
4
de gen. 24
13732
1
de març 15
6642
2
de des. 23
18413
3
de juny 24
3425
2
de jul. 21
6975