Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
19857 Näkymät

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
Hylkää
Paras vastaus

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
Hylkää
Tekijä

Thanks

Is this possible for qweb view?

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
syysk. 23
2726
3
toukok. 23
5381
7
huhtik. 23
48664
1
jouluk. 22
7561
4
jouluk. 23
26224