2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-02 13:28:49 +00:00
InvenTree/docs/docs/barcodes/barcodes.md
Oliver 3e73162368
Barcode scanning (#8732)
* Implement new "general purpose" barcode scan dialog

- Separated widgets for camera / keyboard / wedge scanner
- UI / UX improvements

* Handle scan results

* Fix missing imports

* Handle successful global scan

* Handle error when linking barcode

* Backend fix for InvenTreeInternalBarcodePlugin

* Error handling

* Working on scanner input

* Refactor scan page

* Callback from scanner input

* Refactoring <Scan> page

* Allow InvenTreeTable to be used with supplied data

* Refactor optionalparams

* Refactoring table of scan results

* Implement callbacks

* Navigate from barcode table

* Fix delete callback

* Refactor callbacks

* Refactor idAccessor

- Access as part of useTable hook
- No longer hard-coded to 'pk'

* prevent duplicate scans

* Fix for deleting items from table

* Cleanup

* Bump API version

* Adjust playwright tests

* Update playwright tests

* Update barcode screenshots

* Fix links

* Add quick links to barcode formats

* Updated screenshots

* Fix for BuildLineSubTable

* Specify idAccessor values

* Clear barcode input after timeout period

* Move items

* Fix for playwright test

* Remove debug print

* Additional error ignores

* Cleanup scanner input

- Simplify
- Prevent errant keycodes from closing the scanner dialog

* Playwright test adjustments
2024-12-28 20:38:53 +11:00

3.7 KiB

title
title
Barcodes

Barcode Support

InvenTree has native support for barcodes, which provides powerful functionality "out of the box", and can be easily extended:

Barcode Formats

InvenTree supports the following barcode formats:

  • Internal Barcodes: Native InvenTree barcodes, which are automatically generated for each item
  • External Barcodes: External (third party) barcodes which can be assigned to items
  • Custom Barcodes: Fully customizable barcodes can be generated using the plugin system.

Barcode Model Linking

Barcodes can be linked with the following data model types:

Configuration Options

The barcode system can be configured via the global settings.

Web Integration

Barcode scanning can be enabled within the web interface. This allows users to scan barcodes directly from the web browser.

Input Modes

The following barcode input modes are supported by the web interface:

  • Webcam: Use a connected webcam to scan barcodes
  • Scanner: Use a connected barcode scanner to scan barcodes
  • Keyboard: Manually enter a barcode via the keyboard

Quick Scan

If barcode scanning is enabled in the web interface, select the barcode icon in the top-right of the menu bar to perform a quick-scan of a barcode. If the barcode is recognized by the system, the web browser will automatically navigate to the correct item:

{% with id="barcode_scan", url="barcode/barcode_scan.png", description="Barcode scan" %} {% include 'img.html' %} {% endwith %}

If no match is found for the scanned barcode, the following error message is displayed:

{% with id="barcode_no_match", url="barcode/barcode_no_match.png", description="No match for barcode" %} {% include 'img.html' %} {% endwith %}

Scanning Action Page

A more comprehensive barcode scanning interface is available via the "Scan" page in the web interface. This page allows the user to scan multiple barcodes, and perform certain actions on the scanned items.

To access this page, select Scan Barcode from the main navigation menu:

{% with id="barcode_nav_menu", url="barcode/barcode_nav_menu.png", description="Barcode menu item" %} {% include 'img.html' %} {% endwith %}

{% with id="barcode_scan_page", url="barcode/barcode_scan_page.png", description="Barcode scan page" %} {% include 'img.html' %} {% endwith %}

App Integration

Barcode scanning is a key feature of the companion mobile app. When running on a device with an integrated camera, the app can scan barcodes directly from the camera feed.

Barcode History

If enabled, InvenTree can retain logs of the most recent barcode scans. This can be very useful for debugging or auditing purpopes.

Refer to the barcode settings to enable barcode history logging.

The barcode history can be viewed via the admin panel in the web interface.