Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
20018 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Autor

Thanks

Is this possible for qweb view?

Related Posts Odpovědi Zobrazení Aktivita
1
zář 23
2894
3
kvě 23
5483
7
dub 23
48809
1
pro 22
7699
4
pro 23
26377