Count record show the records value of database and retrieve a list of records and count them, search_count() can be used to retrieve only the number of records matching the query. It takes the same domainfilter as search() and no other parameter and records.
For example you can see below code and use in your Odoo module.
models.execute_kw(db, uid, password,
'res.partner', 'search_count',
[[['is_company', '=', True], ['Test', '=', True]]])
19
Note- With the help of this code we can insert the database value easily in Odoo9.
0 Comment(s)