parameters: (self)
return_statement: return Model.browse(r[0] for r in self.env.cr.fetchall())
docstring: Return the records having 'self' as a value.
docstring_summary: Return the records having 'self' as a value.
docstring_tokens: Return the records having self as a value .
function: 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())
function_tokens: 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 ( ) )