Skip to Content
Menu
This question has been flagged
1 Reply
2958 Views

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
Avatar
Discard
Best Answer

Hi E.M.

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

env['stock.move'].search([('picking_id','=',current_stock_picking)])
Avatar
Discard
Author

Brilliant, thanks.

Related Posts Replies Views Activity
6
Feb 16
6266
2
Feb 16
2564
2
Feb 16
7621
2
Feb 22
4287
2
Sep 15
3288