You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provide an API endpoint for sending scanned data for validation.
Workflow
Client application (web / app / third-party) scans barcode and extracts json data object
JSON data is sent to server
Data are parsed by the server, and "sanitized" into a standard barcode-metadata object
Sanitized (and error-checked) data object passed back to the client for further actions
Barcode Formats
InvenTree
Barcodes can be provided in different "formats". The default format is the QR code generated by InvenTree itself for a StockItem or StockLocation. This barcode data contains some very simple ID information about an element - other data is provided via API lookup.
Manufacturer
Manufacturer / supplier barcode support can be added via a simple translation layer. These barcodes are actually much more useful than the InvenTree ones, as they can be used for:
Unique lookup of StockItem by scanning original manufacturer tag
Scanning of incoming goods - backend compares metadata to match against a purchaseorder
Plugins
Each "manufacturer" barcode style will be supported via a "Plugin" which is loaded by the server. The plugin must provide a certain set of functions and be able to validate a certain style of barcode.
Rather than having each manufacturer as a separate plugin, I took a different approach with my getparts() plugin (new name). We could break it up as you suggest, but then we'll need some preliminary script that determines the appropriate supplier from the barcode information. Getparts() does supplier determination and part query in one step.
RE: workflow
Data are parsed by the server, and "sanitized" into a standard barcode-metadata object
Do we know exactly what we want in the standard barcode-metadata object? If you can list them for me I'll modify getparts() to output only those fields.
Activity
maholli commentedon Apr 13, 2020
Hooray! Awesome work @SchrodingersGat
RE: Plugins
Rather than having each manufacturer as a separate plugin, I took a different approach with my getparts() plugin (new name). We could break it up as you suggest, but then we'll need some preliminary script that determines the appropriate supplier from the barcode information. Getparts() does supplier determination and part query in one step.
RE: workflow
Do we know exactly what we want in the standard barcode-metadata object? If you can list them for me I'll modify getparts() to output only those fields.
Currently:
So we need to decide on...