December 2018
Beginner to intermediate
404 pages
10h 14m
English
Inside a method or a shell session, self represents the current model, and we can only access that model's records. To access other models, we should use self.env. For example, self.env['res.partner'] returns a reference to the Partner model (which is also an empty recordset).
We can then use search() or browse() on it to retrieve recordsets, and the search() methods use a domain expression to define for the record selection criteria.
Read now
Unlock full access