Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
20005 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Auteur

Thanks

Is this possible for qweb view?

Publications associées Réponses Vues Activité
1
sept. 23
2889
3
mai 23
5480
7
avr. 23
48798
1
déc. 22
7695
4
déc. 23
26376