Methods defined on a model are executed on a recordset, and their self is a recordset: class AModel(models.Model): _name = ‘a.model’ def a_method(self): # self can be anywhere between 0 records and all records in the # database self.do_operation() Iterating on a recordset will yield new sets of a single record (“singletons”), much like iterating…
self._context and self.env.context is same. self._context is the shortcut of self.env.context self._context and self.env.context gives the context of the current class. You can refer this slide : http://www.slideshare.net/openobject/odoo-from-v7-to-v8-the-new-api