Skip to main content
Odoo Community Association

Barcode Scanner

Beta License: AGPL-3 OCA/barcode-interface Translate me on Weblate Try me on Runboat

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

Authors

  • Binhex

Contributors

Maintainers

This module is maintained by the OCA.

Odoo Community Association

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:

szalatyzuzanna

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.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for odoo-addon-barcode-scanner 18.0.1.0.0.4
File Interpreter ABI Platform
odoo_addon_barcode_scanner-18.0.1.0.0.4-py3-none-any.whl Python 3 none any Details

Release files / odoo_addon_barcode_scanner-18.0.1.0.0.4-py3-none-any.whl

Download URL odoo_addon_barcode_scanner-18.0.1.0.0.4-py3-none-any.whl
Size 60.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d0fe9017a0e33e7e88d2f0316a6eba097f6d9728589ae8d6dee45b374b722771
BLAKE2b-256 checksum
How to use checksums
6fa6315e2a7dbda5fb9bafec2eb3c0727ecb5022877ca39ea8a9e4d23774cd77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

18.0.1.0.0.4 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page