Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
19877 Widoki

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.

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Autor

Thanks

Is this possible for qweb view?

Powiązane posty Odpowiedzi Widoki Czynność
1
wrz 23
2741
3
maj 23
5397
7
kwi 23
48675
1
gru 22
7576
4
gru 23
26238