InvenTree icon indicating copy to clipboard operation
InvenTree copied to clipboard

Completing Build Outputs without enough allocated stock on Build Orders

Open bberg115 opened this issue 11 months ago • 4 comments

Please verify that this bug has NOT been raised before.

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

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

  • [X] Docker
  • [ ] Bare metal

Version Information

13.6

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

  • [X] I can reproduce this bug on the demo site.

Relevant log output

No response

bberg115 avatar Mar 21 '24 20:03 bberg115

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

bberg115 avatar Mar 21 '24 20:03 bberg115

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.

LavissaWoW avatar Mar 22 '24 22:03 LavissaWoW

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/

SchrodingersGat avatar May 03 '24 12:05 SchrodingersGat

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

bberg115 avatar May 16 '24 20:05 bberg115