Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
20087 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Autore

Thanks

Is this possible for qweb view?

Post correlati Risposte Visualizzazioni Attività
1
set 23
2945
3
mag 23
5542
7
apr 23
48887
1
dic 22
7765
4
dic 23
26442