-
-
Notifications
You must be signed in to change notification settings - Fork 783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add barcode generation capabilities to plugins #7648
Add barcode generation capabilities to plugins #7648
Conversation
✅ Deploy Preview for inventree-web-pui-preview canceled.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7648 +/- ##
==========================================
- Coverage 83.70% 83.68% -0.03%
==========================================
Files 1105 1107 +2
Lines 48869 49057 +188
Branches 1576 1585 +9
==========================================
+ Hits 40906 41051 +145
- Misses 7548 7597 +49
+ Partials 415 409 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This is ready for review now. |
Very nice work; One small visual thing: Could we add some text above the barcode data so it is understandable what the barcode data is meant to be? |
src/backend/InvenTree/plugin/builtin/barcodes/inventree_barcode.py
Outdated
Show resolved
Hide resolved
Added now. Also applied your code review comments.
Yes, that's a very good system. Very easily extendable through barcode parsing plugins. Great base work. |
LGTM. @matmair any further thoughts on this? |
LGTM, great work @wolflu05 |
Hm, the ci tests error seems strange, need to investigate that further tomorrow before we can merge this. |
Ok, figured it out. This is now ready to merge from my side. (For detailed explanation, see #7648 (comment) ) |
@wolflu05 very nice indeed. Thanks for your great work on this! |
This PR adds barcode generation capabilities to plugins which enables custom formats.
The current built-in
inventreebarcode
plugin is used to generate the already existing JSON barcode format, but can also generate the short format described in #6612 (comment) (depends on how the plugin is configured) (can also parse this short format).The previous barcode implementation allowed to create a non-brief variant of qr_code data, which was not used anywhere except in some tests, so I dropped this for now since it was not touched too after the initial implementation 4 years ago. Please tell me if this is actually being used somewhere, then we need to find a different solution.
TODO
Closes #6612