You just have to declare a list of two value tuples with the values. Something like:
colors = fields.Selection([
('red', 'Red'),
('green', 'Green'),
('blue', 'Blue'),
], 'Colors')
The first value will be the internal one, and that will be stored on the database. The second value is the value shown on the client and by default is translatable.
You can also pass a function name, that returns the list of two value tupple. For example:
colors = fields.Selection('get_colors', 'Colors')
@classmethod
def get_colors(cls):
#You can access the pool here.
User = Pool.get('res.user')
users = User.search([])
ret = []
for user in users:
if user.email:
ret.append(user.email, user.name)
return ret
Also if you want to access a single table, you can use a Many2One field, adding widget="selection" on view definition, so the client will render a selection widget instead of the default one, and preload all the records of the table to the selection.