You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stock already allocated to a transfer order can be allocated again to a build order #13286
Please verify that this bug has NOT been raised before.
I checked and didn't find a similar issue
Describe the bug*
I have a stock item of 10 that is fully allocated to an issued transfer order. If I try to allocate it to a build order with the normal allocate action, InvenTree correctly says nothing is available.
But if I create the build allocation through /api/build/item/ instead, it is accepted. Now the same 10 are allocated to both the transfer order and the build order, so 20 allocated from 10.
The screenshots show both allocations on the same stock item. I think the build item check might not be counting transfer order allocations, while the other checks do.
Steps to Reproduce
Make a component part, and an assembly part with that component in its BOM. On the demo, new parts are trackable by default; I had to turn trackable off on both, otherwise the build item call asks for a build output
Add a stock item of 10 for the component
Make a transfer order for the component (quantity 10), issue it, and allocate all 10 from that stock item
Make a build order for 10 of the assembly and issue it
POST /api/build/<build id>/allocate/ with that stock item and quantity 10: refused, "Available quantity (0) exceeded" (correct)
POST /api/build/item/ with {"build_line": <the line id>, "stock_item": <stock item id>, "quantity": 10}: accepted (201)
Open the stock item's Allocations tab: 10 to the build order and 10 to the transfer order
Expected behaviour
Step 6 should be refused the same way step 5 is.
Deployment Method
None
Version Information
1.8.0 dev
Try to reproduce on the demo site
I tried to reproduce
Is the bug reproducible on the demo site?
Reproducible
Relevant log output
on the demo it's BO0029, TO-0006 and the Component D02 stock item (batch D02), until the daily reset
I have reviewed this report for correctness and filled out all sections.
I have checked this report. I acknowledge that filing bugs via AI agents without review might lead to being blocked.
Activity
[bug] Count transfer order allocations when validating build items
SchrodingersGat commentedon Nov 14, 2026
@jordan-dimov thanks for reporting
[bug] Count transfer order allocations when validating build items (i…
[bug] Count transfer order allocations when validating build items (#…