inventree / InvenTree

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

[FR] Split Received StockItems into "Packs of n pieces" (in Purchase Orders) #6221

Open simonkuehling opened 10 months ago

simonkuehling commented 10 months ago

Please verify that this feature request has NOT been suggested before.

Problem statement

Often I receive a quantity of an article as stock from a Purchase Order that come in individually packaged boxes or bags - like for example

These will go onto the warehouse shelf as individual StockItems (like one single power supply, on canister of 5L, etc) and get QR-code labeled as such, each.

For this I currently need to either

or

Both is pretty slow and repetitive, obviously.

Suggested solution

If we had a "split"-operation in the Received Items StockItem Table where one could enter the pack quantity that the items shall be devided into, that would be super useful.

I guess this would also benefit to other users than me as well..?

IMG_0095

Describe alternatives you've considered

Thought about a plugin solution for this, but I would need to recreate a lot of UI (rendering another StockItem table in a custom plugin panel for example) to do that...

Examples of other systems

No response

Do you want to develop this?

SchrodingersGat commented 9 months ago

This has been requested before, still have not arrived at a "good" solution

One option may be to create a "supplier bundle" (which contains the listed parts, much like an asembly has a bill of materials), receive that, and then provide an option to "break out" the sub-items?

simonkuehling commented 9 months ago

I think these are different features - the issue your are mentioning seem to have settled to „disassembly“ of assemblies/bundles that can consist of different parts.

My request would be basically the opposite of the „merge“ function, to split/divide a bigger StockItem into several smaller StockItems (of quantity n).

Implementation wise it could be just a repetitive „transfer“ operation until the quantity of the source StockItem is lower or equal to n.

github-actions[bot] commented 7 months ago

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

SchrodingersGat commented 7 months ago

Not stale

simonkuehling commented 3 weeks ago

Coming back to this to review against the platform UI, I'd like to propose a pretty simple implementation for this:

What if we extend the /stock/transfer/ API endpoint, adding a new parameter like split_into for the max number of parts per stock item.

I think it could fit very well into the API side, just adding one additional argument to StockItem.move() to drive a looped execution of self.splitStock(). https://github.com/inventree/InvenTree/blob/fb9c117e374443500000845d271d8deabc5ee47f/src/backend/InvenTree/stock/models.py#L2032

On the UI side that could be just an additional column in the "transfer stock" modal table - or it could be its own new action as "split stock", which would be more explicit to a new user I guess.

SchrodingersGat commented 3 weeks ago

@simonkuehling are you suggesting that in the "transfer" function, if you are moving a quantity of 100x units, you can specify "split into" quantity (e.g. 5) which would create 20 new stock items each of quantity 5?