Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
3614 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Autore

Brilliant, thanks.

Post correlati Risposte Visualizzazioni Attività
6
feb 16
7254
2
feb 16
3219
2
feb 16
8446
2
feb 22
5287
2
set 15
4282