InvenTree icon indicating copy to clipboard operation
InvenTree copied to clipboard

Unable to allocate stock

Open mabroens opened this issue 1 year ago • 12 comments

Please verify that this bug has NOT been raised before.

  • [X] I checked and didn't find a similar issue

Describe the bug*

After Cancelling a build order image

image

im not able to allocate stock a new build order: image

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

image

image

image

Expected behaviour

i would expect the 2799 pcs to be availeble: image

Deployment Method

  • [ ] Docker
  • [ ] Package
  • [X] 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: b32f081a 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

mabroens avatar Apr 29 '24 16:04 mabroens

To add to this: when i select a part and go for Build ORder Allocations, that page keeps loading data and never finishes.

mabroens avatar Apr 29 '24 17:04 mabroens

@mabroens if I am understanding what you are saying:

image

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 avatar May 02 '24 05:05 SchrodingersGat

To add to this: when i select a part and go for Build ORder Allocations, that page keeps loading data and never finishes.

Can you reproduce this on the demo server?

SchrodingersGat avatar May 02 '24 05:05 SchrodingersGat

@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?

mabroens avatar May 02 '24 06:05 mabroens

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

SchrodingersGat avatar May 02 '24 06:05 SchrodingersGat

Okay but consumed stock is empty: image

or am i looking at the wrong location??

mabroens avatar May 02 '24 10:05 mabroens

Also for each part that was in in these buildorders i see: image

and Build Order Allocations stays on loading: image

mabroens avatar May 02 '24 18:05 mabroens

and Build Order Allocations stays on loading:

Can you open up the developer console in your browser, and in the "console" tab you will probably see an error message there?

SchrodingersGat avatar May 03 '24 06:05 SchrodingersGat

image this what your looking for?

mabroens avatar May 03 '24 06:05 mabroens

@mabroens thanks, that was helpful. Bug fix incoming in https://github.com/inventree/InvenTree/pull/7153 which should handle most of the issues raised here...

SchrodingersGat avatar May 03 '24 07:05 SchrodingersGat

Okay but consumed stock is empty: image

or am i looking at the wrong location??

@SchrodingersGat was this the right location or should i wait for a fix??

mabroens avatar May 04 '24 13:05 mabroens

@mabroens found some further issues - https://github.com/inventree/InvenTree/pull/7178

SchrodingersGat avatar May 08 '24 01:05 SchrodingersGat

This issue seems stale. Please react to show this is still important.

github-actions[bot] avatar Jul 07 '24 11:07 github-actions[bot]