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:
- إدارة علاقات العملاء
- e-Commerce
- المحاسبة
- المخزون
- PoS
- Project
- MRP
لقد تم الإبلاغ عن هذا السؤال
2
الردود
9437
أدوات العرض
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
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!
أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!
تسجيلالمنشورات ذات الصلة | الردود | أدوات العرض | النشاط | |
---|---|---|---|---|
|
2
فبراير 24
|
3954 | ||
|
0
يناير 23
|
1492 | ||
|
4
أبريل 19
|
12884 | ||
|
1
يناير 25
|
1048 | ||
|
1
سبتمبر 24
|
2978 |