
So as the title explains my goal is to automatically create a warehouse shipment when i'm releasing the sales order but there is a slight difference in how it should happen. Normally the amount that it takes from the sales line would be the "to ship quantity". Now the way i want to implement it is: on my sales line i have another field where i can enter a quantity.
This is where it gets even a bit more complicated:
So picture it like this, on a sales line there is:
Quantity to ship: Quantity to get:
10 2
(now keep in mind that this is when there is 1 sales line, obviously there could be multiple sales line so that also needs to work as explained below)
Now when i click release when there is a number above 0 in the "quantity to get" field, i basically want to create 2 warehouse shipments:
1 shipment will have an amount of 8 (coming from "quantity to ship" - "quantity to get")
and the other shipment will have an amount of 2 (coming from the "quantity to get")
I've looked for some options but i can't seem to find a direct solution.
In what way would i be able to implement this?
Thanks in advance.
UPDATE:
I've managed to create a warehouse shipment when releasing the document by using following code in the OnAfterAction of Release: