- ID
- 2da8ee36-089b-4648-86ea-5f1d5220e685
BE-6951 Expose stock check tool in admin
- source :: https://hungryroot.atlassian.net/browse/BE-6951
- tags :: Hungryroot API Project
- epic :: EP-411 Eng Parking Lot
- sprint :: HR BE Sprint 102
- status :: Status - Needs QA
Tasks
DONE Experiment with Cursor solution to adding this stock tool to admin
- ID
- 330e52fe-bc50-5aeb-2ddc-a798df38af9b
DONE Fix failing tests
- ID
- 451d2752-5739-fb46-e1e0-4fb662d4f712
DONE Change form to GET params and allow embedding without headers or form
- ID
- 4f3c00bb-d9ce-59ee-2d32-5e727600c23e
Description
We have an existing Django management command that checks in-stock /
out-of-stock status for products and pairings by origin and inventory date,
including per-ingredient breakdowns for pairings. To enable self-service for
Product, Marketing, and Operations teams, expose this functionality in Django
Admin with a custom admin page and form.
The admin UI should allow users to input Origin ID (required), optional Pairing
ID or Product ID, and optional Inventory Date(s), submit the request, and view
results directly in the admin interface without running CLI commands.
Results should be displayed in a clear, readable format (table or structured
sections) showing entity name/ID, origin, inventory date(s), stock status,
customizable units, and—for pairings—a per-ingredient in/out-of-stock breakdown.
The implementation should reuse the existing command’s core logic (factored into
a shared service layer), include validation and helpful error messaging for
invalid inputs or missing inventory data, and be accessible to non-engineering
users via Django Admin permissions.