Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
20270 มุมมอง

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?

Related Posts ตอบกลับ มุมมอง กิจกรรม
How to install odoo 10 in ubuntu 20.04? แก้ไขแล้ว
1
ก.ย. 23
3090
3
พ.ค. 23
5683
7
เม.ย. 23
49063
Barcode scanner from mobile แก้ไขแล้ว
1
ธ.ค. 22
7901
How to set a domain for a field in XML? แก้ไขแล้ว
4
ธ.ค. 23
26581