Skip to content
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 support to scan digiKey partlabels #5119

Closed
davrex opened this issue Jun 28, 2023 · 13 comments
Closed

Add support to scan digiKey partlabels #5119

davrex opened this issue Jun 28, 2023 · 13 comments
Labels
barcode Barcode scanning and integration feature plugin Plugin ecosystem
Milestone

Comments

@davrex
Copy link

davrex commented Jun 28, 2023

Add support to scan digiKey partlabels QR for easier adding of stock items.
Scan QR
find matching part,
populate the quantity
20230628_223507

@SchrodingersGat
Copy link
Member

@davrex I literally have the same piece of paper sitting on my desk - as a reminder to implement this exact thing.

This would best be implemented as a barcode plugin for the inventree server.

@SchrodingersGat SchrodingersGat transferred this issue from inventree/inventree-app Jun 28, 2023
@SchrodingersGat SchrodingersGat added barcode Barcode scanning and integration plugin Plugin ecosystem feature labels Jun 28, 2023
@github-actions
Copy link
Contributor

This issue seems stale. Please react to show this is still important.

@github-actions github-actions bot added the inactive Indicates lack of activity label Aug 28, 2023
@SchrodingersGat
Copy link
Member

not stale, still a good idea!

@github-actions github-actions bot removed the inactive Indicates lack of activity label Aug 29, 2023
@30350n
Copy link
Contributor

30350n commented Sep 5, 2023

Hey! I'd be interested in helping to implement this. I've already managed to get barcode scanning working by adding a barcode plugin, but in the current state this isn't really useful for checking in parts after receiving an order.

For me personally, the ideal workflow would be to:

  1. Add the Part/ManufacturerPart/SupplierPart definitions to Inventree automatically after ordering, via something similar to Ki-nTree (I'm currently working on my own simplified version of this. Ideally this would also have to be accessible from within the InvenTree interface directly).
  2. Add the Order by providing the BOM from the manufacturer. (This already works pretty well, although I've had some issues with part value detection).
  3. Once the order is received: Scan in each items barcode, directly followed by a Stock Location barcode, to automatically mark the item as received and create the new Stock item.

For me personally, I'd like to be able to do 3. quick and easily via the App. I'm thinking of adding a Scanning Action in the Purchase Orders section, like this:

The information present in the 2D barcode could then be used to automatically figure out the Order etc.

I'm not sure though how an implementation for the InvenTree web interface would like.
Would be very happy to get some feedback/more ideas on this topic! :)

@matmair
Copy link
Member

matmair commented Sep 5, 2023

I am currently actively working on 3) here #5500 and have ideas for 1) in #3791

@matmair
Copy link
Member

matmair commented Sep 5, 2023

Implementing this in the App shouldn't be too difficult, the source code is here: https://github.com/inventree/InvenTree-app

@30350n
Copy link
Contributor

30350n commented Sep 5, 2023

I am currently actively working on 3) here #5500 and have ideas for 1) in #3791

Great! I've seen #5500 earlier, but wasn't sure if it'd apply to this, so thanks for confirming that ^^

I've already managed to get my own less bloated version of Ki-nTree going, here's a gist of the (still very messy) WIP code. Looking at #3791, I'm guessing that's supposed to implement the neccesary foundations/api for allowing "part importing plugins" to exist in the first place right?
And your actual implementation for DigiKey lives in inventree-digikey?
If so I'd be happy to try and integrate my part importing code into there, if desired.

@30350n
Copy link
Contributor

30350n commented Sep 5, 2023

Implementing this in the App shouldn't be too difficult, the source code is here: https://github.com/inventree/InvenTree-app

Yep, I'm already on it! Main issue is I've never messed with app development/dart before really, but it looks pretty straight forward, so I'll see what I can come up with.

@matmair
Copy link
Member

matmair commented Sep 5, 2023

I am currently actively working on 3) here #5500 and have ideas for 1) in #3791

Great! I've seen #5500 earlier, but wasn't sure if it'd apply to this, so thanks for confirming that ^^

I've already managed to get my own less bloated version of Ki-nTree going, here's a gist of the (still very messy) WIP code. Looking at #3791, I'm guessing that's supposed to implement the neccesary foundations/api for allowing "part importing plugins" to exist in the first place right? And your actual implementation for DigiKey lives in inventree-digikey? If so I'd be happy to try and integrate my part importing code into there, if desired.

#3791 is not ready for prime time right now but the idea is to move all the vendor APIs to plugins and into mainline Inventree - so that access to them can be exposed both to WebUI and API (with perks like simple configs over various machines, rate watching etc). It would be great if we could have a good digikey plugin once that is done but it is to early to hold anyone of their development.

Yep, I'm already on it! Main issue is I've never messed with app development/dart before really, but it looks pretty straight forward, so I'll see what I can come up with.

Setting up the environment is the most time-consuming task there, dart itself is IMO very easy if you know a bit of JS.

@SchrodingersGat
Copy link
Member

@30350n thanks for commenting, your approach sounds really nice. I have put some brief thought into this previously, and your overall process seems good.

I would add another simple step: 4) Assign the hash of the ECIA barcode to the newly created stock item. This means that any successive scans will use the internal barcode plugin and directly identify the newly created stock item.

Additionally, scanning the barcode should 5) Return the newly created stock item - so that the app / UI / api / can immediately reference the new item.

Writing this as a back-end plugin means that it might be able to work out-of-the-box with the app without any change to code - and certainly any required changes could be made pretty simply.

@30350n
Copy link
Contributor

30350n commented Sep 6, 2023

Thanks a lot!

  1. is a great idea!

Writing this as a back-end plugin means that it might be able to work out-of-the-box with the app without any change to code - and certainly any required changes could be made pretty simply.

This is not really possible I think (as discussed here).

@matmair
Copy link
Member

matmair commented Sep 6, 2023

I think that we should implement the more complex checking/receiving actions in P UI/React. Multi-step stuff in one API-call might be a bit intransparent. When done in the UI we can (for now) keep the state just in the client and make our life a lot easier. This could for example be done with #5500 as a suggested action if an order barcode is detected

@SchrodingersGat
Copy link
Member

@davrex please note that this has now been implemented as a first-class feature. The InvenTree app can now directly scan barcodes for incoming digikey orders!

Closed in #5509

@SchrodingersGat SchrodingersGat added this to the 0.13.0 milestone Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
barcode Barcode scanning and integration feature plugin Plugin ecosystem
Projects
None yet
Development

No branches or pull requests

4 participants