October 2019
Beginner to intermediate
504 pages
12h 57m
English
While the preceding code only returns the IDs of the records, the new Odoo API allows you to both search and read the actual fields from the model with one single API call. Here, we return some fields from the sales order header as shown in the following snippet:
models.execute_kw(db, uid, password,
'sale.order', 'search_read',
[[['x_rush, '=', True], ['state', '=', 'done']]],
{'fields': ['name', 'country_id', 'comment'], 'limit': 5})
Read now
Unlock full access