Skip to Content
Menu
This question has been flagged
3015 Zobrazenia

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šiť

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

Related Posts Replies Zobrazenia Aktivita
4
jan 24
13963
1
mar 15
6766
2
dec 23
18558
3
jún 24
3609
2
júl 21
7090