inventree / InvenTree

Open Source Inventory Management System
https://docs.inventree.org
MIT License
4.32k stars 781 forks source link

Completing Build Outputs without enough allocated stock on Build Orders #6810

Open bberg115 opened 7 months ago

bberg115 commented 7 months ago

Please verify that this bug has NOT been raised before.

Describe the bug*

When completing the Incomplete Output and NOT selecting "Complete outputs if stock has not been fully allocated" - a user can close out an incomplete build output even without any parts allocated. I confirmed this bug exists even if some, but not enough, parts are allocated. However, it does not appear to happen when a serialized (unique) items is on the BOM..

Steps to Reproduce

  1. Create build order for qty X
  2. Create build incomplete output for anything between 1 and X
  3. Complete output without checking "Complete outputs if stock has not been fully allocated"

chrome_XuHOPY2ZEW

chrome_0MMPuxb8Pr

chrome_Gq8XNq7vhE

Expected behaviour

I would expect this to NOT create a "completed output" and stay incomplete.

Edit: we realized that "Completed Outputs" go to stock before the BO is completed and is messing up stock.

However, Inventree does NOT allow for you to close the Build Order without checking the "Accept that stock items have not been fully allocated to this build order" after clicking Complete Build.

Deployment Method

Version Information

13.6

Please verify if you can reproduce this bug on the demo site.

Relevant log output

No response

bberg115 commented 7 months ago

Updated bug issue - we realized that "completed outputs" effect stock even without a complete build order.

LavissaWoW commented 7 months ago

I've ssen something oddly similar to this myself. A colleague made a BO, added outputs, then cancelled it without completing said outputs. Stock was still subtracted from all BOM items.

SchrodingersGat commented 6 months ago

Stock was still subtracted from all BOM items.

@LavissaWoW this is likely because your colleague had selected the "subtract allocated stock" option when cancelling the build order.

I would expect this to NOT create a "completed output" and stay incomplete.

@bberg115 when you "complete" a build output, this action is separate to consuming the stock required to produce the build output. Stock is "consumed" then the build order (not the build output) is marked as complete.

Ref: https://docs.inventree.org/en/stable/build/allocate/

bberg115 commented 6 months ago

Thanks for the reply. Per your link:

Untracked stock items are consumed against the build order, once the order is completed.

I have also verified that the stock is replaced when canceled.

However, the comment about completing BO with unallocated and incomplete is still not possible. I do not desire this feature, but it looks like it should be a viable option per the screenshot below. image