Skip to content

[ui] Show stock item ID in RenderStockItem#11137

Open
wlcx wants to merge 1 commit intoinventree:masterfrom
wlcx:master
Open

[ui] Show stock item ID in RenderStockItem#11137
wlcx wants to merge 1 commit intoinventree:masterfrom
wlcx:master

Conversation

@wlcx
Copy link
Contributor

@wlcx wlcx commented Jan 14, 2026

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:
image

@wlcx wlcx requested a review from SchrodingersGat as a code owner January 14, 2026 13:06
@netlify
Copy link

netlify bot commented Jan 14, 2026

Deploy Preview for inventree-web-pui-preview ready!

Name Link
🔨 Latest commit 6628518
🔍 Latest deploy log https://app.netlify.com/projects/inventree-web-pui-preview/deploys/696794e23dc3030008d21465
😎 Deploy Preview https://deploy-preview-11137--inventree-web-pui-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 94 (🟢 up 1 from production)
Accessibility: 81 (no change from production)
Best Practices: 100 (no change from production)
SEO: 78 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@matmair matmair added enhancement This is an suggested enhancement or new feature User Interface Related to the frontend / User Interface labels Jan 14, 2026
@matmair matmair added this to the 1.2.0 milestone Jan 14, 2026
@matmair
Copy link
Contributor

matmair commented Jan 14, 2026

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

@wlcx
Copy link
Contributor Author

wlcx commented Jan 14, 2026

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)

@wlcx
Copy link
Contributor Author

wlcx commented Jan 14, 2026

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.

@SchrodingersGat
Copy link
Member

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")?

@matmair
Copy link
Contributor

matmair commented Jan 15, 2026

@SchrodingersGat not sure if a hover element is ergonomic enough;

Future note; not ready for dev / adoption through this PR

Should 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.

@matmair
Copy link
Contributor

matmair commented Jan 27, 2026

@wlcx please add a setting for this for now (default off) so we can merge this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement This is an suggested enhancement or new feature User Interface Related to the frontend / User Interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants