İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
20016 Görünümler

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
Vazgeç
En İyi Yanıt

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
Vazgeç
Üretici

Thanks

Is this possible for qweb view?

İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Eyl 23
2892
3
May 23
5482
7
Nis 23
48804
1
Ara 22
7698
4
Ara 23
26376