Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
20009 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Penulis

Thanks

Is this possible for qweb view?

Post Terkait Replies Tampilan Aktivitas
1
Sep 23
2890
3
Mei 23
5481
7
Apr 23
48799
1
Des 22
7696
4
Des 23
26376