integer_update_flag
The numeric twin of boolean_update_flag: an integer input that also records whether a human, rather than a recalculation, moved the number. It has one sharp edge above 999.
| Technical name | integer_update_flag |
|---|---|
| Field types | integer |
| Views | form, list |
| Module | survey, though nothing in the widget is survey-specific |
| Used in core | 1 occurrence, the question time limit input in survey |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0 |
| No-code setup | No. It needs an options key and a context key that Studio cannot write |
| Alternatives | boolean_update_flag, integer, float |
What the integer update-flag field does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
flagFieldName | string (options key, camelCase) | Technical name of the boolean field that receives the comparison result. Spelled in camelCase in the source and required; snake_case is ignored.(since Odoo 18.0) |
referenceValue | number (context key) | The number the typed value is compared against, supplied through the field's context attribute rather than options. Required and type-checked as a number.(since Odoo 18.0) |
enable_formatting | boolean | Inherited from the integer widget. Set it to False to remove thousands separators, which also makes this widget's comparison exact above 999.(default: true)(since Odoo 17.0) |
type | string | Inherited. Set to number to render a real HTML number input, which is also what makes min and max take effect. |
step | number | Inherited. Step of the number input's spinner. |
human_readable | boolean | Inherited. Displays large values compactly, for example 1k. Avoid it here: the compact string breaks the comparison even harder than a thousands separator.(default: false)(since Odoo 17.0) |
decimals | number | Inherited. Only meaningful together with human_readable.(default: 0)(since Odoo 17.0) |
min | number | <strong>Inherited and undeclared on the base integer widget too.</strong> Forwarded to the HTML input, so it only constrains input when type is number.(since Odoo 19.0) |
max | number | <strong>Inherited and undeclared on the base integer widget too.</strong> Same conditions as min.(since Odoo 19.0) |
Watch the spelling and the location. flagFieldName is camelCase and belongs in options; referenceValue belongs in context. Both props are declared without the optional marker, so a missing or misspelled key produces a props validation error rather than a silent fallback. The inherited min and max are undeclared even on the base integer widget, and only take effect when the input is rendered as a real number input through type.
Working examples
The thousands separator that breaks the comparison
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. Same behavior on the development branch; only the hook and props syntax change. |
| Odoo 19.0 | Verified | Verified against the shipped source. Byte-identical to Odoo 18; the base integer widget gained min and max and lost placeholder. |
| Odoo 18.0 | Verified | First version. Same option key, context key and comparison. |
| Odoo 17.0 | Not available | Widget does not exist. |
| Odoo 16.0 | Not available | Widget does not exist. |
Upgrade note. The Odoo 18 and Odoo 19 files are byte-identical, so views move across untouched. What did change around it is the base integer widget: Odoo 19 dropped support for the placeholder attribute and added the undeclared min and max options, both of which this widget inherits. A view that relied on a placeholder here will lose it on Odoo 19 with no error.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| A value equal to the default is still flagged as customized | The value is 1000 or more, so the formatted string carries a thousands separator and parseInt truncates it. Add 'enable_formatting': False to the options, which removes the separator. |
| Props error mentioning flagFieldName | The key is missing or written in snake_case; only options.flagFieldName is read. Write options="{'flagFieldName': 'your_flag_field'}" exactly. |
| Props error mentioning referenceValue | No referenceValue in the field's context, or the expression yields a non-number. Add context="{'referenceValue': some_integer_field}" and confirm it evaluates to a number. |
| The flag never changes | The flag field is not loaded in the view, or the change came from an onchange rather than typing. Add the flag field to the view invisibly, and remember the widget only reacts to the input's own change event. |
| min and max do nothing | The input is rendered as text, which is the default, so the HTML constraints are inert. Add 'type': 'number' to the options, or validate server side. |
| The placeholder disappeared after upgrading to Odoo 19 | The base integer widget stopped extracting the placeholder attribute in Odoo 19. Use a label or help text instead; the placeholder cannot be restored through XML. |
| human_readable makes flagging erratic | The comparison parses the compact display string, so 1k is read as 1. Do not combine human_readable with this widget. |
Integer update-flag field vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
integer_update_flag | Knowing that a person, not a compute, changed a number | Listens to the input's change event and writes a second boolean field with the comparison result |
| boolean_update_flag | The same override tracking on a checkbox | Overrides the component's onChange rather than hooking the input element |
integer | An ordinary whole number | Writes one field and knows nothing about defaults or overrides |
| float | Decimal quantities | Different type entirely; this widget only supports integer fields |
Frequently asked questions
Why does integer_update_flag mis-flag values above 999?+
Where do its two settings go?+
How is it different from boolean_update_flag?+
Do imports update the flag?+
Can I use the standard integer options with it?+
Numbers in your Odoo that nobody dares change?
Default values, per-record overrides and the reporting that has to survive both are a design problem before they are a coding problem. We work through that logic with your team and build it end to end on Odoo 16 through 19, browser side and server side.
Book a free consultation