Skip to Content
Menú
This question has been flagged
1 Respondre
20023 Vistes

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.

Avatar
Descartar
Best Answer

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

Avatar
Descartar
Autor

Thanks

Is this possible for qweb view?

Related Posts Respostes Vistes Activitat
1
de set. 23
2899
3
de maig 23
5485
7
d’abr. 23
48819
1
de des. 22
7711
4
de des. 23
26384