Skip to Content
मेन्यू
This question has been flagged
1 Reply
20077 Views

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
Discard
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
Discard
Author

Thanks

Is this possible for qweb view?

Related Posts Replies Views Activity
1
सित॰ 23
2940
3
मई 23
5537
7
अप्रैल 23
48872
1
दिस॰ 22
7759
4
दिस॰ 23
26426