跳至內容
選單
此問題已被標幟
1 回覆
20241 瀏覽次數

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
3055
3
5月 23
5658
7
4月 23
49036
1
12月 22
7880
4
12月 23
26565