In Manage planning issues with stock quantity we managed the planning issue of delivery. But another point in the stock management is to reduce the quantities in the warehouse -to reduce the cost). This is already done by default with the supply computation which schedule the replenishment to be just in time.
With the same logic as for quantity issue when the supplier is late, the supplier (or the production) could also be in advance on the planning. In this case it may be good to try to deliver the customer or the produce (or even to ship internally) earlier.
We create a new module
We create a scheduled job that loop over all the outgoing moves from a warehouse and we find for each move the earliest date it could be done without altering the stock (see below). This quantity is stored on a generic model.
Once we have those dates for every outgoing moves, we can compute for each outgoing shipment and production the earlier date possible (max earliest date of each move) and the earliest date possible (min earliest date of each move) and the percentage of “quantity”. We store on the same generic model this information.
From this list the user will be able to take action as the list will be ordered by the gain.
The user may decide to ignore a possible optimization such that it will no more be recomputed.
From the record, the user will be able to open the graph of product quantity for the warehouse and the products. This will help to choose an action like a date or split the order etc.
- origin: Reference field of
- planned_date: Computed from the origin
- earlier date
- earliest date and percentage
The computation of the earliest date of a move
The earliest date can be computed for a move as following the quantity for the product from the planned date of the move back in time as long as the quantity is growing or not going below the quantity at the planned date.