November 2016
Beginner to intermediate
298 pages
6h 10m
English
From the previous section, we already got a taste of what it is like to use the ORM API. Next we will look at what more we can do with it.
During our journey, the several methods we encountered used API decorators like @api.multi. These are important for the server to know how to handle the method. Let's recap the ones available and when they should be used.
The @api.multi decorator is used to handle recordsets with the new API and is the most frequently used. Here self is a recordset, and the method will usually include a for loop to iterate it.
In some cases, the method is written to expect a singleton: a recordset containing no more than one record. The @api.one decorator was deprecated as of 9.0 and should ...
Read now
Unlock full access