(self)
return Model.browse(r[0] for r in self.env.cr.fetchall())
Return the records having 'self' as a value.
Return the records having 'self' as a value.
Return the records having self as a value .
def _get_records(self):
        """ Return the records having 'self' as a value. """
        self.ensure_one()
        Model = self.env[self.field_id.model]
        query = 'SELECT id FROM "{table}" WHERE "{field}"=%s'.format(
            table=Model._table, field=self.field_id.name,
        )
        self.env.cr.execute(query, [self.value])
        return Model.browse(r[0] for r in self.env.cr.fetchall())
def _get_records ( self ) : self . ensure_one ( ) Model = self . env [ self . field_id . model ] query = 'SELECT id FROM "{table}" WHERE "{field}"=%s' . format ( table = Model . _table , field = self . field_id . name , ) self . env . cr . execute ( query , [ self . value ] ) return Model . browse ( r [ 0 ] for r in self . env . cr . fetchall ( ) )