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

I am trying to do this:

env['stock.move'].search([('picking_id','==',current_stock_picking)])
-current_stock_pikcing holds a given id value (in this test is 3)-.


But I get:

Invalid leaf ('picking_id', '==', 3)", "name": "exceptions.ValueError", "arguments": ["Invalid leaf ('picking_id', '==', 3)"]}}

How should I specify the search/subset condition? Thanks
الصورة الرمزية
إهمال
أفضل إجابة

Hi E.M.

You have an error in the operator '==', you should use only '=', like:

env['stock.move'].search([('picking_id','=',current_stock_picking)])
الصورة الرمزية
إهمال
الكاتب

Brilliant, thanks.

المنشورات ذات الصلة الردود أدوات العرض النشاط
6
فبراير 16
7492
2
فبراير 16
3385
2
فبراير 16
8616
2
فبراير 22
5451
2
سبتمبر 15
4493