Launch offer
Business website $150 USD Custom plugin $200 USD Ready in 5 days
Get a quote
Odoo

Boolean and Selection Fields in Odoo

Use Boolean for flags and Selection for fixed choice lists.

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')

Leave a reply

Your email address will not be published. Required fields are marked *