Rational
Currently the order points are designed to handle the case when a quantity is below a defined threshold.
There are cases where a company might want to automatically generate internal shipments when a quantity in a location exceed a defined amount (eg: to move the result of the production for example).
Proposal
We propose to add target_quantity on stock.order_point. This quantity will represent the quantity that the order point should reach by moving in (or out) some products in the location.
The overflow_location field will be the stock location where the goods will be moved.
Implementation
The max_quantity field will change its semantic. A migration will be included to copy its value in target_quantity.
Only target_quantity will be required, max_quantity (resp. min_quantity) will be required only if min_quantity (resp. max_quantity) is NULL thanks to a states.
A domain between the different quantities will replace the SQL constraint we use actually to check if max_quantity >= min_quantity.
Contrary to the provisioning case, the overflow case does not come with an implicit minimal quantity. Thus there is no need for a default overflowing location on stock.location.