-
-
Notifications
You must be signed in to change notification settings - Fork 669
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
Fix some issues with supplier barcode plugins #5919
Fix some issues with supplier barcode plugins #5919
Conversation
✅ Deploy Preview for inventree-web-pui-preview canceled.
|
(This should be solved before a potential 0.13.0 release imo). |
Don't think so, can you share one of those barcodes?
Interesting, that seems like a larger refactor. Honestly I'm not super sure about the code structure we ended up with ... The main idea with having a plugin per supplier was to create a starting point for further supplier specific integrations, like search/part importing (i.e. directly integrating stuff like my part importing CLI into InvenTree. Not sure how the roadmap looks like for that though exactly. If that's not going to be a thing (in core), then it might be better to refactor everything into one single big plugin again, which would be able to detect all the different supplier barcode formats and handle them accordingly. |
@30350n thanks for the updates. I'll ping you when I make a new PR |
I went through a bunch of parts with the new barcode scanning functionality again and noticed some bugs / possible improvements:
get_supplier_parts(...)
inmixins.py
(accidentally doing a fresh query there instead of reusing the existing one)get_supplier_parts(...)
, makes a bunch of queries and fails, then the mouser one gets called and does the same queries again)SupplierPart
viaget_supplier_parts
I return an error response, which leads to that error being directly returned to the end user. i think the better behavior would be to let the other plugins run first and only return the error if all of them fail (don't return a result) aswell. alternatively we could just get rid of said error response and returnNone
insteadlogging
in all supplier plugins (forgot to remove these apparently)