2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-13 10:35:40 +00:00

Barcode logging (#8150)

* Add model for recording barcode scan results

* Add "admin" interface for new model

* Add API endpoints for barcode scan history

* Add global setting to control barcode result save

* Add frontend API endpoint

* Add PUI table in "admin center"

* Add API filter class

* Enable table filtering

* Update model definition

* Allow more characters for barcode log

* Log results to server

* Add setting to control how long results are stored

* Table updates

* Add background task to delete old barcode scans

* Add detail drawer for barcode scan

* Log messages for BarcodePOReceive

* Add warning message if barcode logging is not enabled

* Add "context" data to BarcodeScanResult

* Display context data (if available)

* Add context data when scanning

* Simplify / refactor BarcodeSOAllocate

* Refactor BarcodePOAllocate

* Limit the number of saved scans

* Improve error message display in PUI

* Simplify barcode logging

* Improve table

* Updates

* Settings page fix

* Fix panel tooltips

* Adjust table

* Add "result" field

* Refactor calls to "log_scan"

* Display result in PUI table

* Updates

* Fix typo

* Update unit test

* Improve exception handling

* Unit test updates

* Enhanced unit test

* Ensure all database key config values are upper case

* Refactor some playwright helpers

* Adds playwright test for barcode scan history table

* Requires some timeout

* Add docs
This commit is contained in:
Oliver
2024-09-23 23:30:50 +10:00
committed by GitHub
parent f7e0edb7a6
commit 6002103129
28 changed files with 929 additions and 168 deletions

View File

@ -56,3 +56,11 @@ If no match is found for the scanned barcode, the following error message is dis
## App Integration
Barcode scanning is a key feature of the [companion mobile app](../app/barcode.md).
## 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](../settings/global.md#barcodes) to enable barcode history logging.
The barcode history can be viewed via the admin panel in the web interface.

View File

@ -90,6 +90,8 @@ Configuration of barcode functionality:
{{ globalsetting("BARCODE_WEBCAM_SUPPORT") }}
{{ globalsetting("BARCODE_SHOW_TEXT") }}
{{ globalsetting("BARCODE_GENERATION_PLUGIN") }}
{{ globalsetting("BARCODE_STORE_RESULTS") }}
{{ globalsetting("BARCODE_RESULTS_MAX_NUM") }}
### Pricing and Currency