Skip to Content
मेन्यू
This question has been flagged
2 Replies
9439 Views

in odoo 15,
 request.env['product.product'].sudo().search_read([('id','=', search_id)]), used to give all the fields. 
seems like its not the same for 17. 
How can i read all the fields in odoo17 orm. 
What do i use ? search, search_read? Most importantly, how to do i get all the data?

Avatar
Discard
Best Answer

Hi,

You can try this code , request.env['product.product'].search_read([], ['id'])


Regards

Avatar
Discard
Best Answer

Hi junaid 

you can get 

 request.env['product.product'].search_read([])

or you can find specific field using like 

request.env['product.product'].search_read([],['name','id'])


Thanks

Avatar
Discard
Related Posts Replies Views Activity
2
फ़र॰ 24
3956
0
जन॰ 23
1492
4
अप्रैल 19
12884
1
जन॰ 25
1048
1
सित॰ 24
2981