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?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
2
Odpowiedzi
8131
Widoki
Hi,
You can try this code , request.env['product.product'].search_read([], ['id'])
Regards
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
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
2
lut 24
|
3244 | ||
|
0
sty 23
|
1282 | ||
Advanced Search: How to remove fields?
Rozwiązane
|
|
4
kwi 19
|
12545 | |
|
1
sty 25
|
597 | ||
|
1
wrz 24
|
2465 |