Barcode Scanner
This module is the base framework of the Barcode suite: a fast, full-screen scanning application shell for Odoo that other modules extend.
It ships no business logic of its own. Instead it exposes the building blocks feature modules plug into, the same way Odoo widgets self-register:
a full-screen client action and a lightweight in-app router;
registries for screens, scan handlers and home-screen menu tiles (barcode_screens, barcode_scan_handlers, barcode_menu_tiles);
the barcode input service (hardware/keyboard wedge), audio/vibration feedback, an ORM/API wrapper and shared hooks.
Install a feature module on top — such as barcode_stock — to get actual warehouse operations.
Table of contents
Usage
barcode_scanner is a framework and is not useful on its own: install a feature module such as barcode_stock to get actual operations.
To build your own feature module, register your pieces into the framework registries — no change to the base module is required.
Register a screen:
import {barcodeScreens} from "@barcode_scanner/js/registries";
barcodeScreens.add("my_screen", {component: MyScreen});
Register a scan handler (tried in sequence order; the first that returns a truthy value consumes the scan):
import {barcodeScanHandlers} from "@barcode_scanner/js/registries";
barcodeScanHandlers.add("my_handler", {
async handle(barcode, parsed, {api, navigate, notify}) {
// return true when handled
},
}, {sequence: 50});
Register a home-screen tile:
import {barcodeMenuTiles} from "@barcode_scanner/js/registries";
barcodeMenuTiles.add("my_tile", {
label: "My Screen",
icon: "fa-cube",
action: ({navigate}) => navigate("my_screen"),
}, {sequence: 50});
Register a barcode parser (tried in sequence order before the built-in EAN13 one; return null to let the next parser try):
import {barcodeParsers} from "@barcode_scanner/js/registries";
barcodeParsers.add("my_symbology", (barcode) => {
// return {type: "...", value: "<product code>", ...} or null
}, {sequence: 20});
Register a startup task, for data your module needs before the first scan (barcode_gs1 reads its nomenclature this way). Tasks are awaited when the app opens; one that fails is logged and skipped:
import {barcodeStartupTasks} from "@barcode_scanner/js/registries";
barcodeStartupTasks.add("my_config", (env) => loadMyConfig(env.services.orm));
Bug Tracker
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.
Do not contact contributors directly about support or help with technical issues.
Credits
Contributors
Maintainers
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
Current maintainer:
This module is part of the OCA/barcode-interface project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Release files for odoo-addon-barcode-scanner 18.0.1.0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| odoo_addon_barcode_scanner-18.0.1.0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Release files / odoo_addon_barcode_scanner-18.0.1.0.0.2-py3-none-any.whl
| Download URL | odoo_addon_barcode_scanner-18.0.1.0.0.2-py3-none-any.whl |
|---|---|
| Size | 59.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b392563923278a30975a2377d754730b3902a96f8ba58a8c32f22b5818cfc4df
|
|
BLAKE2b-256 checksum How to use checksums |
a0fb0fce3c1278298e5bf2b1f0d38903e03abcc298a81a9a4dbbecd05f696546
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|