コンテンツへスキップ
メニュー
この質問にフラグが付けられました
3144 ビュー

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

アバター
破棄

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

関連投稿 返信 ビュー 活動
4
1月 24
14247
1
3月 15
6992
2
12月 23
18826
3
6月 24
3923
2
7月 21
7288