Skip to main content
iVentureTeam

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.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 25, 2026Updated August 25, 20267 min read
Odoo 19 form view showing an integer field in edit mode rendered by the integer widget with thousands-separator formatting applied.
Studio nameInteger
Technical nameinteger
Field typesinteger
Viewsform, list, kanban, pivot, settings
Moduleweb, present in every Odoo database
Used in coreDefault for all integer fields; 2 explicit widget="integer" occurrences, notably the im_livechat call-count pivot measure
VersionsOdoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0
No-code setupYes. Studio adds Integer fields directly; the formatting options are XML-only.
Alternativesfloat, monetary, percentpie, progressbar

What the Integer field does

The integer widget is the input Odoo mounts automatically on every whole-number field, which is why explicit widget="integer" is rare in core views: the two occurrences that exist are pivot measures forcing a count back to plain integer rendering where another widget would otherwise apply. In readonly it prints the formatted value; in edit it renders a text input with inputmode="numeric", which brings up the number keypad on phones without the quirks of a native number input.

Formatting follows the user's language: thousands separators and digit grouping come from the locale, and can be disabled per field. Parsing is forgiving, accepting the localized format back, and since Odoo 19 also accepts arithmetic.

What this means for your team

Whole numbers carry more configuration weight than they look. Inventory counts on a warehouse dashboard read faster with separators on; reference numbers like a year or an external id must have them off, 2,026 being wrong in every sense; and analytics screens full of large counters benefit from the compact human-readable form. All three are one option away on the same widget, so the choice is a view decision, not a data one.

The 19.0 typed-math addition is a real floor-level productivity feature: a stock clerk correcting a count can type +=12 instead of doing mental arithmetic, and the widget applies it on confirm. It works anywhere the integer widget edits, lists included, and needs no configuration.

Setting it up in Odoo Studio (no code)

Odoo Studio, available on Enterprise plans, handles the field itself without code.

  1. Open the view you want to change and click Studio in the top menu.

  2. From the Add a field panel, drag Integer where you want it. Studio creates the database column immediately.

  3. In the field's Properties, set the label, default value, and whether the field is required.

  4. To display it differently, change Widget to Percentage Pie or Progress Bar; leaving it on the default keeps this widget.

Tip: turn on developer mode before adding the field to control its technical name; Studio otherwise generates one like x_studio_integer_field_1 that reports and integrations then depend on.

What Studio cannot do here

Studio's properties panel covers label, default, and visibility, but not this widget's formatting knobs. Disabling the thousands separator with enable_formatting, compacting large values with human_readable, switching to a native number input, or bounding the spinner with the undocumented min and max all require editing the view XML, which is developer territory. If a report-critical number renders with the wrong grouping, that one-line options change is the fix, not a new field.

Supported options in Odoo 19

Verified against integer_field.js in the Odoo 19.0 web module. Five options are declared in the metadata; two more are read in extractProps without being declared anywhere, and one former attribute is gone.

OptionTypeWhat it does
enable_formattingbooleanApplies 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_readablebooleanCompacts 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)
decimalsnumberDecimal 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)
typestringSets the HTML input type. With 'number' the browser spinner appears, formatting is disabled while editing, and min, max, and step become enforceable.(default: text)
stepnumberSpinner increment for the native number input, forwarded as the input's step attribute.
minnumberUndocumented: 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)
maxnumberUndocumented 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

Reference numbers: kill the separator

<field name="fiscal_year" options="{'enable_formatting': False}"/>

Renders 2026, not 2,026. No widget attribute needed since integer is the default.

Big counters, compact display

<field name="page_views"
       options="{'human_readable': True, 'decimals': 1}"/>

Shows 1.2M until the user clicks in, then the exact value for editing. decimals only affects the compact form.

Native number input with bounds

<field name="priority_level"
       options="{'type': 'number', 'min': 1, 'max': 10, 'step': 1}"/>

Spinner arrows step by 1 and the browser blocks values outside 1 to 10. Note that formatting is disabled while editing in this mode.

Forcing integer rendering on a pivot measure

<field name="number_of_calls" type="measure" widget="integer"/>

The im_livechat analytics pivot does exactly this, one of only two explicit uses in core.

What Odoo 19 changed without telling anyone

Odoo 19 changed the widget in three ways that do not appear in any release notes. First, the parser now runs with allowOperation, enabling the relative math syntax: an entry like +=10 is parsed as an operation against the current value and applied when the edit is confirmed. Second, empty values are handled explicitly: a false value renders as an empty string in the unformatted paths where earlier versions could leak false into the input. Third, the placeholder attribute is gone. Through Odoo 18, extractProps read attrs.placeholder and the template rendered it; in 19 both ends were removed, so a placeholder on an integer field is silently ignored. If a form relied on placeholder text as a hint, move it to the label, a tooltip, or a placeholder_field-capable widget like char.

One more subtlety worth knowing: human_readable formatting is suspended while the input has focus, using internal focus state, so users always edit the exact number. The compact form is a display skin, never the stored value.

Version compatibility

VersionStatusNotes
Odoo 20.0In developmentNot released. Only a props-API migration is visible on the development branch; see below.
Odoo 19.0VerifiedVerified against the shipped source: adds typed math and min/max, removes the placeholder.
Odoo 18.0VerifiedSame declared options as 19 but with placeholder support and no typed math or min/max.
Odoo 17.0VerifiedThe release that introduced enable_formatting, human_readable, and decimals.
Odoo 16.0Partial / changedWidget 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

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026. The development branch is unstable and these notes are provisional until release, when this page is re-verified.

For this widget the branch shows a pure internals migration: props move to the new Owl typing API with an exported integerFieldProps object, and state and refs move to proxy and signal.ref. The option list, the undocumented min and max, the typed-math parsing, and the absent placeholder are all unchanged at the time of writing.

Common problems and fixes

SymptomCause and fix
Placeholder text not showing on an integer fieldOdoo 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 separatorLanguage-aware formatting is on by default. Add options="{'enable_formatting': False}" to the field.
min and max are ignoredThey 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 expectedhuman_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 versionOperation 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 fieldOdoo 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

WidgetBest forKey difference
integerEvery plain whole-number fieldLocale formatting, typed math, and per-view display options
floatDecimal quantitiesDigit precision options and decimal parsing
monetaryMoneyCurrency symbol and per-currency decimal rules
percentpiePercentages at a glanceRead-only circle chart instead of an input
progressbarProgress against 100Linear bar with thresholds, editable variant available

The alternatives are about meaning, not size: money gets monetary, fractions get float or percentage, and visual progress gets progressbar. Keep plain integers on this widget and tune it with options rather than switching.

Frequently asked questions

How do I remove the thousands separator from an integer field in Odoo?+
Set options="{'enable_formatting': False}" on the field in the view. The separator comes from the user's language settings and is applied by default to every integer field.
Does the Odoo integer widget support a placeholder?+
Not since Odoo 19. Versions 16 through 18 rendered the field's placeholder attribute, but 19 removed it from both the props and the template, so the attribute is now silently ignored on integer fields.
What does typing +=10 into an integer field do?+
On Odoo 19, the parser accepts relative operations: +=10, -=5, *=2, and /=4 apply the arithmetic to the current value when you confirm the entry. This works in any view where the integer widget is editable.
How do I set minimum and maximum values on an integer field?+
The widget accepts undocumented min and max options since 19.0, but they are forwarded as native input attributes and only constrain entry when combined with options="{'type': 'number'}". For real enforcement, add an SQL or Python constraint on the model.
What does human_readable do on an integer field?+
It compacts large values for display, for example 500,000,000,000 renders as 500G, with decimals controlling the precision of the compact form. The exact value reappears the moment the input gains focus, so editing is always precise.
Why does my integer field show 0 instead of being empty?+
Integers in Odoo store 0 as a value, and the widget only treats false as empty. If your process needs to distinguish not set from zero, model the field as nullable data elsewhere or present it through a computed display.
Did the integer widget change between Odoo 16 and 19?+
Yes, twice. Odoo 17 added the formatting options, enable_formatting, human_readable, and decimals. Odoo 19 added typed math and the undocumented min and max, and removed placeholder support. The development branch shows only internal changes for 20.

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

How this page was produced

This page was verified by reading integer_field.js and its template on the Odoo 19.0 branch and diffing the 16.0, 17.0, 18.0, and development-branch versions, which is how the placeholder removal and the undocumented min and max were confirmed. Core usage was checked in the im_livechat analytics views. The screenshot was captured on a clean Odoo 19 database. Corrections are welcome via our contact page.