[ui] Show stock item ID in RenderStockItem#11137
[ui] Show stock item ID in RenderStockItem#11137wlcx wants to merge 1 commit intoinventree:masterfrom
RenderStockItem#11137Conversation
✅ Deploy Preview for inventree-web-pui-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Not sure if this makes sense as the default; growing to many options is also not good; will have to think about this before giving an option; thx for the contribution |
|
Yeah, understood on both points. I don't know if there's a simpler option to achieve this though, and from having used InvenTree quite extensively in production now it's the main shortcoming in an otherwise very smooth flow from PO -> stock -> BO. Otherwise (forthcoming barcode scanning in forms aside) all other options rely on unwieldy changes to workflow (splitting stock items and assigning them to a dedicated location before assigning or having separately identifiable locations for every different stock item) |
|
I think #8909 describes the same thing but focussing on batch code - but this is of course not always present or applicable for all parts/stock items. |
|
Some menu entries render with a "mouse over" element - we could add the ID here instead? The ID/PK I would consider "clutter" - however there are certainly times when you might need to know it. So a HoverCard element with the ID value (as well as any other "additional items")? |
|
@SchrodingersGat not sure if a hover element is ergonomic enough; Future note; not ready for dev / adoption through this PRShould we make the highlighted values configurable from the backend? Maybe with a structured response in the options call so that frontend code is not made more and more complicated. Could mash together well Profiles as described in WIP ADR-0002 to provide a lot of configuration without blowing up the code base too much. |
|
@wlcx please add a setting for this for now (default off) so we can merge this |

Show the stock item ID in when rendering stock items.
This is primarily so that stock items can be positively identified when allocating stock to a build order: currently two stock items in the same location with the same quantities are rendered identically, which easily leads to stock being allocated from the wrong stock item. This issue is also addressed with the new "barcode in forms" functionality in 1.2.0.
It's only really useful if stock items are being tracked individually, with barcoded labels, but this is how inventree encourages stock to be managed (and is the main thing causing us pain in our deployment) so I figured it was probably generally useful to just always show. Let me know if you think it should be behind a config option though.
Here's how it looks in the allocate stock dialog:
