Boolean and Selection Fields in Odoo — a practical guide to Odoo Boolean Selection with clear examples you can reuse in real projects.
Odoo Tutorial Series (19/112). Prefer one article? Read the complete Odoo tutorial.
Short description
Selection values are stored as keys; labels are for UI.
Selection
active = fields.Boolean(default=True)
state = fields.Selection([
('draft', 'Draft'),
('done', 'Done'),
], default='draft')