Rationale
Some businesses are using POS, but they do not always have the products on hand. For example, it is frequent in pharmacies that they are missing some drugs from a prescription, but they will order them from the supplier for the afternoon or the next day.
Such businesses need a way to reserve those products (to be supplied) and keep track of them to finish the sale later.
Proposal
In a new module sale_point_reservation:
- on sale, we add a
Floatfieldquantity_on_holdwhich stores the quantity not delivered. - a state ‘On Hold’ is added between “Open” and “Done” (available only if there is some quantity on hold). It sets a number to the sale and creates draft stock moves for the lines (which are deleted if reset to “Open” or cancel).
- a wizard is added to the line to decrease the
quantity_on_holdof the delivered or not delivered quantity. And the reservation stock move is updated accordingly. - the
amount_to_paydoes not include the quantity on hold. - the sale is forbidden to go to “Done” until all the quantity on hold is delivered.
- a delay is configured and a deadline is set to keep the reservation. A scheduled task removes the reservation when it is passed.