Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
20058 Visualizações

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
Cancelar
Melhor resposta

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
Cancelar
Autor

Thanks

Is this possible for qweb view?

Publicações relacionadas Respostas Visualizações Atividade
1
set. 23
2930
3
mai. 23
5502
7
abr. 23
48851
1
dez. 22
7741
4
dez. 23
26408