Skip to content

Fix issue 10769 - #12286

Open
Alonso-Lopez-1 wants to merge 3 commits into
inventree:masterfrom
Alonso-Lopez-1:fix-issue-10769
Open

Fix issue 10769#12286
Alonso-Lopez-1 wants to merge 3 commits into
inventree:masterfrom
Alonso-Lopez-1:fix-issue-10769

Conversation

@Alonso-Lopez-1

@Alonso-Lopez-1 Alonso-Lopez-1 commented Jun 30, 2026

Copy link
Copy Markdown

What does this PR do?

This update displays the status badges for all parts wherever RenderStockItem is utilized. This allows statuses such as "Attention Needed" and "Damaged" to be visible in stock allocation dropdowns, while also displaying the appropriate status badge in other areas of the UI that use the same renderer.

Why was this PR needed?

People allocating stock within these order forms needed to know if the stock needed attention or was damaged.

What are the relevant issue numbers?

Closes #10769

Screenshots

Build Order allocation dropdown displays "Damaged" and "Attention Needed" badges

BO_Allocate_Stock_Test1

Sales Order allocation dropdown displays "Damaged" and "Attention Needed" badges

SO_Allocate_Stock_Test1

Does this PR meet the acceptance criteria?

  • Tests added for new/changed behavior
  • All tests passing
  • Follows project style guide
  • No breaking changes introduced
  • Documentation updated

@netlify

netlify Bot commented Jun 30, 2026

Copy link
Copy Markdown

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

Name Link
🔨 Latest commit 3d510c5
🔍 Latest deploy log https://app.netlify.com/projects/inventree-web-pui-preview/deploys/6a80d919cf1f6c0008971ce1
😎 Deploy Preview https://deploy-preview-12286--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: 97 (no change 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
🤖 Make changes Run an agent on this branch

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

@Alonso-Lopez-1

Copy link
Copy Markdown
Author

Hi @SchrodingersGat, this is my first contribution to InvenTree. I fixed #10769 by displaying “Damaged” and “Attention Needed” stock status badges in the Build Order and Sales Order allocation dropdowns. Would appreciate a review when you have time. Thank you!

@SchrodingersGat

Copy link
Copy Markdown
Member

I would suggest a different approach - display the stock status all the time, rather than these complex checks

@Alonso-Lopez-1

Copy link
Copy Markdown
Author

@SchrodingersGat Thank you for your feedback and my apologies for the delay. So to clarify, when you say display the stock status all the time, do you mean to display every other status, such as "Ok" and "Returned", as well? Or do you mean to eliminate the checks in BuildForms and SalesOrderForms and display the stock status everywhere that RenderStockItem is used?

@SchrodingersGat

Copy link
Copy Markdown
Member

Or do you mean to eliminate the checks in BuildForms and SalesOrderForms and display the stock status everywhere that RenderStockItem is used?

Yes, I would suggest to display the status all the time - as long as we can get it rendering "cleanly" in the forms

@Alonso-Lopez-1

Copy link
Copy Markdown
Author

@SchrodingersGat I simplified the implementation and now the badges render the stock status everywhere that RenderStockItem is used. Below are the other areas identified which will display the stock status as well, if you’d prefer only specific statuses to be shown, I’m happy to adjust it.

Stock Tracking after installation (Under "Details" column in "Stock Item" row)

Stock Tracking Badge After Installing

Installed Items dropdown

Installed Items Drop Down Badge

Global Search displays

Global Search Badge display

Disassemble Stock Item form

Disassemble Stock Item Badge

Consume Stock form

Consume Stock Item Badge

@SchrodingersGat SchrodingersGat added the User Interface Related to the frontend / User Interface label Aug 15, 2026
@SchrodingersGat SchrodingersGat added this to the 1.6.0 milestone Aug 15, 2026
@SchrodingersGat

Copy link
Copy Markdown
Member

I am happy with this approach. @matmair any objections?

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

Labels

User Interface Related to the frontend / User Interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FR] Show "Attention needed" and "Demaged" state when allocating

2 participants