Initial commit: InvenTree Stock Tool v2

A comprehensive barcode scanning application for InvenTree inventory management.

Features:
- Multi-mode operation (Add/Update/Check/Locate stock)
- Smart duplicate prevention when adding stock
- Barcode scanning with automatic part code cleaning
- Real-time server connection monitoring
- Part information display with images
- Debug mode for troubleshooting

Fixes applied:
- Fixed encoding issues with non-ASCII characters in barcodes
- Fixed API response handling for list and dict formats
- Implemented duplicate prevention using PATCH to update existing stock
- Added comprehensive error handling and logging

Includes test suite for verification of all fixes.
This commit is contained in:
2025-10-28 16:31:48 +07:00
commit ab0d1ae0db
9 changed files with 1971 additions and 0 deletions

9
example_config.yaml Normal file
View File

@@ -0,0 +1,9 @@
# InvenTree Stock Tool Configuration
# Copy this file to ~/.config/scan_and_import.yaml and fill in your details
# Your InvenTree server URL (without trailing slash)
host: https://inventree.example.com
# Your InvenTree API token
# Get this from: Settings > User Settings > API Tokens in InvenTree
token: your-api-token-here