コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
19056 ビュー

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.

アバター
破棄
最善の回答

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

アバター
破棄
著作者

Thanks

Is this possible for qweb view?

関連投稿 返信 ビュー 活動
1
9月 23
1990
3
5月 23
4798
7
4月 23
48036
1
12月 22
6958
4
12月 23
25622