Closed guewen closed 9 years ago
Not really correct, it works by accident.
Example of a flow:
I have 2 products on my SO, that I deliver in 3 steps (pick+pack+ship).
stock.pack.operation
:
The product_id
is set only on the operations of the PICK picking, because afterwards we move only packages. Thus, I'm not sure that our method to get the pack is correct.
My first feeling is that we can filter all the operations where a product is set, whatever the picking is and as soon as we have a package_id or a result_package_id. My only doubt is : can we remove products from a package? If so, we'll have to subtract their weight.
Now, if I something like that:
stock.pack.operation
:
Then, the weight must include the sum of the products included in PACK0000065!
My last commit covers the 2 scenarii
Could you review please?
Take the destination package. If empty, the package is moved so take the source one.