Repository navigation
Description
Please verify that this bug has NOT been raised before.
- I checked and didn't find a similar issue
Describe the bug*
After Cancelling a build order

im not able to allocate stock a new build order:

but if i understand correct: than i still have 1377 pcs availeble and require 1125 more. but for some reason i can not allocate them.
coudl you please advice what t check .
and its for many parts not this single item.
Steps to Reproduce
Expected behaviour
i would expect the 2799 pcs to be availeble:

Deployment Method
- Docker
- Package
- Bare metal
- Other - added info in Steps to Reproduce
Version Information
Version Information:
InvenTree-Version: 0.14.5
Django Version: 4.2.11
Commit Hash: b32f081
Commit Date: None
Commit Branch: stable
Database: sqlite3
Debug-Mode: False
Deployed using Docker: False
Platform: Linux-6.5.0-28-generic-x86_64-with-glibc2.35
Installer: PKG
Target: ubuntu:20.04
Active plugins: [{'name': 'InvenTreeBarcode', 'slug': 'inventreebarcode', 'version': '2.0.0'}, {'name': 'InvenTreeCoreNotificationsPlugin', 'slug': 'inventreecorenotificationsplugin', 'version': '1.0.0'}, {'name': 'InvenTreeCurrencyExchange', 'slug': 'inventreecurrencyexchange', 'version': '1.0.0'}, {'name': 'InvenTreeLabel', 'slug': 'inventreelabel', 'version': '1.0.0'}, {'name': 'InvenTreeLabelMachine', 'slug': 'inventreelabelmachine', 'version': '1.0.0'}, {'name': 'InvenTreeLabelSheet', 'slug': 'inventreelabelsheet', 'version': '1.0.0'}, {'name': 'DigiKeyPlugin', 'slug': 'digikeyplugin', 'version': '1.0.0'}, {'name': 'LCSCPlugin', 'slug': 'lcscplugin', 'version': '1.0.0'}, {'name': 'MouserPlugin', 'slug': 'mouserplugin', 'version': '1.0.0'}, {'name': 'TMEPlugin', 'slug': 'tmeplugin', 'version': '1.0.0'}]
Please verify if you can reproduce this bug on the demo site.
- I can reproduce this bug on the demo site.
Relevant log output
No response

Activity
mabroens commentedon Apr 29, 2024
To add to this: when i select a part and go for Build ORder Allocations, that page keeps loading data and never finishes.
SchrodingersGat commentedon May 2, 2024
@mabroens if I am understanding what you are saying:
Selecting "Remove Allocated Stock" when cancelling a build order will actually remove that quantity of stock and it will be consumed by the build order. Thus, it will not be available any longer. So, I think that this is simply what has happened here - the quantity of stock has been consumed by the build order during cancellation.
SchrodingersGat commentedon May 2, 2024
Can you reproduce this on the demo server?
mabroens commentedon May 2, 2024
@SchrodingersGat ai. yes that is what i did but not how i thought it would work.
any way using admin or whatever to revert this?
SchrodingersGat commentedon May 2, 2024
You can go to the build order and for each "consumed stock item" you will need to open the admin view and set the "consumed_by" field to null. That should be enough to bring those stock items back into the system
mabroens commentedon May 2, 2024
Okay but consumed stock is empty:

or am i looking at the wrong location??
mabroens commentedon May 2, 2024
Also for each part that was in in these buildorders i see:

and Build Order Allocations stays on loading:

SchrodingersGat commentedon May 3, 2024
Can you open up the developer console in your browser, and in the "console" tab you will probably see an error message there?
mabroens commentedon May 3, 2024
this what your looking for?
SchrodingersGat commentedon May 3, 2024
@mabroens thanks, that was helpful. Bug fix incoming in #7153 which should handle most of the issues raised here...
mabroens commentedon May 4, 2024
@SchrodingersGat was this the right location or should i wait for a fix??
SchrodingersGat commentedon May 8, 2024
@mabroens found some further issues - #7178
github-actions commentedon Jul 7, 2024
This issue seems stale. Please react to show this is still important.