Skip to main content
iVentureTeam

field_float_scannable

A float field that reacts to a barcode scan by firing a synthetic input event on itself. It is four lines long, and Odoo 20 removes it.

September 18, 2026Updated September 18, 20263 min read
Technical namefield_float_scannable
Field typesfloat
Viewsform, list
Modulebarcodes, installed with Inventory and similar apps
Used in core0 uses in Odoo 19 Community or Enterprise. Removed entirely in Odoo 20.
VersionsOdoo 19.0
No-code setupNo. There is no Studio entry for this widget.
Alternativesfloat, barcode_handler, many2one_barcode

What the field_float_scannable widget does

The whole widget:

export class FloatScannableField extends FloatField {
    static template = "barcodes.FloatScannableField";
    onBarcodeScanned() {
        this.inputRef.el.dispatchEvent(new InputEvent("input"));
    }
}

export const floatScannableField = {
    ...floatField,
    component: FloatScannableField,
};

It extends the standard float field and spreads the float descriptor, so every float option carries over. The one addition is onBarcodeScanned, which fires a synthetic InputEvent on the field's own input element.

That is a deliberate trick. A scanner types into the page faster than a human, and some of Odoo's input plumbing only reacts to real input events. Dispatching one manually makes the rest of the field machinery notice the value that just arrived.

What this means for your team

This is a quantity box on a warehouse screen that keeps up with a scanner. Without it, a scanned quantity can land in the DOM without the field noticing, and the user saves a number that was never registered.

Because standard Odoo never used it, the question is only whether your own views do. If they do, an Odoo 20 upgrade removes the widget and the field reverts to a plain float. It will still accept typed input; it just stops reacting to scans the way it did.

Working examples

On a quantity field, in Odoo 19:

<field name="quantity" widget="field_float_scannable"
       options="{'digits': [16, 2]}"/>

In Odoo 20 that same line finds no registration and falls back to the field's default rendering.

Version compatibility

VersionStatusNotes
Odoo 19.0VerifiedVerified against the shipped 19.0 source. Inherits float's options.
Odoo 20.0Not availableRemoved alongside barcode_handler. No replacement widget.

Present in Odoo 19, absent in Odoo 20.

What is changing in Odoo 20

Removed. The registration is not on the 20.0 branch and the source file is gone.

There is no replacement widget. The barcode module's other field widget, barcode_handler, was removed in the same release, and barcode handling moved into the services registry as barcode_handlers, which acts on the interface through macros rather than through a field.

A view still carrying this widget will log a missing-widget warning in the browser console and render the field with its default float widget. Values still save; only the scan reaction is lost.

Common problems and fixes

SymptomCause and fix
A scanned quantity does not register on Odoo 19The plain float widget is in use rather than this one, so no synthetic input event fires. Set widget="field_float_scannable" on the quantity field.
A missing-widget warning in the console after upgrading to Odoo 20The registration no longer exists. Remove the widget attribute and rework the scan flow against the Odoo 20 barcode service.
Float options appear to work here but not on a similar custom widgetThis descriptor spreads floatField; a widget that only extends the component inherits no options. Spread the parent descriptor when writing your own.

Field_float_scannable widget vs the alternatives

WidgetBest forKey difference
field_float_scannableA quantity field that must react to scans, on Odoo 19Fires a synthetic input event on scan, and does not exist in Odoo 20
floatAn ordinary typed quantityNo scan reactivity
barcode_handlerCatching a scan into a hidden fieldInvisible, and also removed in Odoo 20
many2one_barcodeSelecting a record by scanningStill present in Odoo 20

On Odoo 19, a plain float is the fallback if you do not need scan reactivity. On Odoo 20, build against the barcode service instead of looking for a widget. Because the original is four lines, reproducing it as a custom widget is a realistic interim step if a rework has to wait.

Frequently asked questions

Does field_float_scannable work in Odoo 20?+
No. The registration and its file are gone from the 20.0 branch. Odoo logs a missing-widget warning and renders the field with the default float widget, so values still save but scans no longer trigger the field.
What does field_float_scannable actually do?+
It extends the float widget and adds one method that dispatches a synthetic InputEvent on the field's own input when a barcode is scanned, so the rest of Odoo's input handling notices the value a scanner just delivered.
Does it support the normal float options?+
Yes. Its descriptor spreads floatField, so options such as digits carry over. That is worth contrasting with widgets that extend a component without spreading the descriptor, which end up supporting nothing.

Warehouse screens that have to keep up with a scanner?

Scanner behavior is the part of an Odoo warehouse build that only shows problems under real throughput. We build and test picking and receiving screens against actual hardware, and we scope what Odoo 20 changes before you commit to it.

Talk to an Odoo consultant

How this page was produced

Verified by reading addons/barcodes/static/src/float_scannable_field.js on the 19.0 branch of a local clone of the official Odoo repository, quoted in full above. Its absence in Odoo 20 was confirmed by listing addons/barcodes/static/src/ on the 20.0 branch and by a registry diff across both trees. Usage counts come from scanning every XML file in Community, Enterprise and odoo/addons/base. Corrections welcome via our contact page.