Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
19896 Prikazi

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
Opusti
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
Opusti
Avtor

Thanks

Is this possible for qweb view?

Related Posts Odgovori Prikazi Aktivnost
1
sep. 23
2766
3
maj 23
5416
7
apr. 23
48695
1
dec. 22
7593
4
dec. 23
26257