تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3141 أدوات العرض

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
يناير 24
14233
1
مارس 15
6979
2
ديسمبر 23
18816
3
يونيو 24
3914
2
يوليو 21
7281