Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2929 Zobrazení

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
Zrušit

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

Related Posts Odpovědi Zobrazení Aktivita
4
led 24
13755
1
bře 15
6653
2
pro 23
18429
3
čvn 24
3444
2
čvc 21
6997