integer
The Integer field widget is the default editor for whole numbers in Odoo. Behind the plain input sit formatting toggles, two undocumented options, relative typed math, and a placeholder that quietly stopped working in 19.
| Studio name | Integer |
|---|---|
| Technical name | integer |
| Field types | integer |
| Views | form, list, kanban, pivot, settings |
| Module | web, present in every Odoo database |
| Used in core | Default for all integer fields; 2 explicit widget="integer" occurrences, notably the im_livechat call-count pivot measure |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0 |
| No-code setup | Yes. Studio adds Integer fields directly; the formatting options are XML-only. |
| Alternatives | float, monetary, percentpie, progressbar |
What the Integer field does
What this means for your team
Setting it up in Odoo Studio (no code)
What Studio cannot do here
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
enable_formatting | boolean | Applies the user's language formatting, thousands separators included. Set to False for years, ids, and reference numbers. Declared with a help text in the metadata.(default: true)(since Odoo 17.0) |
human_readable | boolean | Compacts large values, 500,000,000,000 renders as 500G, but only while the input is unfocused; editing always shows the exact number.(since Odoo 17.0) |
decimals | number | Decimal places used by the compact human-readable form, for example 1.2M instead of 1M. No effect without human_readable.(default: 0)(since Odoo 17.0) |
type | string | Sets the HTML input type. With 'number' the browser spinner appears, formatting is disabled while editing, and min, max, and step become enforceable.(default: text) |
step | number | Spinner increment for the native number input, forwarded as the input's step attribute. |
min | number | Undocumented: read in extractProps, declared nowhere, new in 19.0. Forwarded as the input's min attribute, so it only constrains entry with type 'number'.(since Odoo 19.0) |
max | number | Undocumented twin of min, also new in 19.0 and also only effective with type 'number'. Neither replaces a server-side constraint.(since Odoo 19.0) |
min and max are quieter than they look. They are undocumented, and they are forwarded as native HTML attributes on the input. On the default text input browsers ignore them entirely; they only constrain entry when you also set options="{'type': 'number'}", and even then only through browser validation and the spinner, not through Odoo-side validation. Server-side constraints still belong on the model.
Working examples
What Odoo 19 changed without telling anyone
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. Only a props-API migration is visible on the development branch; see below. |
| Odoo 19.0 | Verified | Verified against the shipped source: adds typed math and min/max, removes the placeholder. |
| Odoo 18.0 | Verified | Same declared options as 19 but with placeholder support and no typed math or min/max. |
| Odoo 17.0 | Verified | The release that introduced enable_formatting, human_readable, and decimals. |
| Odoo 16.0 | Partial / changed | Widget exists with only type, step, and placeholder knobs; no formatting toggles. |
Upgrade note. XML written for 16 keeps working through 19 with two exceptions: placeholder attributes stop rendering in 19, and code that depended on formatting quirks of enable_formatting, human_readable, and decimals cannot target 16, where those options did not exist yet. The option set has otherwise been stable since 17.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| Placeholder text not showing on an integer field | Odoo 19 removed placeholder support from this widget; 16 through 18 rendered it. Use the label or a tooltip for the hint, or accept the empty input. |
| Year or ID renders with a thousands separator | Language-aware formatting is on by default. Add options="{'enable_formatting': False}" to the field. |
| min and max are ignored | They are passed as native attributes, which browsers ignore on text inputs. Combine them with options="{'type': 'number'}", and enforce real limits with a model constraint. |
| Compact value like 1.2M shown while editing was expected | human_readable formatting deliberately suspends while the input is focused. None; users must edit exact values. The compact form returns on blur. |
| Typing +=10 inserts text instead of adding on an older version | Operation parsing shipped in 19.0. Upgrade to 19, or have users type the final value on 18 and below. |
| Zero displays where you expected an empty field | Odoo stores 0 for integers; the widget's isEmpty only treats false as empty. Use a compute or related display field if empty-versus-zero matters to users. |
Integer field vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
integer | Every plain whole-number field | Locale formatting, typed math, and per-view display options |
| float | Decimal quantities | Digit precision options and decimal parsing |
| monetary | Money | Currency symbol and per-currency decimal rules |
| percentpie | Percentages at a glance | Read-only circle chart instead of an input |
| progressbar | Progress against 100 | Linear bar with thresholds, editable variant available |
Frequently asked questions
How do I remove the thousands separator from an integer field in Odoo?+
Does the Odoo integer widget support a placeholder?+
What does typing +=10 into an integer field do?+
How do I set minimum and maximum values on an integer field?+
What does human_readable do on an integer field?+
Why does my integer field show 0 instead of being empty?+
Did the integer widget change between Odoo 16 and 19?+
Number formatting is a symptom, not the problem
When teams argue about separators, compact displays, and input bounds, the real topic is reporting they can trust. We build clean Odoo data models, views, and validation for companies on Odoo 16 through 19, down to details like this widget's options.
Book a free consultation