콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
9676 화면

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?

아바타
취소
베스트 답변

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
2월 24
4168
0
1월 23
1550
4
4월 19
12982
1
1월 25
1161
1
9월 24
3104