Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
20004 Lượt xem

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.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Tác giả

Thanks

Is this possible for qweb view?

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 9 23
2889
3
thg 5 23
5480
7
thg 4 23
48798
1
thg 12 22
7694
4
thg 12 23
26374