From the Odoo 13 documentation:
The Make to Order route will trigger a procurement (purchase order or manufacturing order) with the necessary quantity to fulfill a product request (coming from a sale order or a manufacturing order). The system will not check the quantity on hand for the corresponding product.
I'm trying to create a module that changes the behavior of the Make to Order (now appears to be called "Replenish on Order (MTO)") route so that it checks stock levels before doing any procurement, and only replenishes what is necessary to fulfill the product request that triggers the route. I've been unable to find where this operation is done, so I'm not sure how to go about this.
I'd appreciate it a lot if anyone can point me in the right direction!