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

How to get the count of records based on a certain criteria.If i need to get the number of recordsets having particular value in its field.


example-If i need to get number of records having a particular name in its name field.

아바타
취소
베스트 답변

Hi,

To get the number of records satisfying the given criteria you can the search_count.

total_len = self.env['model_name'].search_count([('document_type', '=', 'entry')])

Thanks

아바타
취소
작성자

Thanks

Is this possible for qweb view?

관련 게시물 답글 화면 활동
1
9월 23
3012
3
5월 23
5617
7
4월 23
48978
1
12월 22
7855
4
12월 23
26523