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.
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
Good !!
Is this possible for qweb view?
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up| Related Posts | Replies | Views | Activity | |
|---|---|---|---|---|
|
1
Sep 23
|
5184 | |||
|
3
May 23
|
7869 | |||
|
7
Apr 23
|
51715 | |||
|
Barcode scanner from mobile
Solved
|
1
Dec 22
|
9923 | ||
|
4
Dec 23
|
29073 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.