Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
20021 Vistas

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
Mejor respuesta

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?

Publicaciones relacionadas Respuestas Vistas Actividad
1
sept 23
2898
3
may 23
5483
7
abr 23
48811
1
dic 22
7704
4
dic 23
26381