Similar topic is already posted in ideas category. You want to create purchase orders out of items which meet certain conditions (e.g. out of stock). For that, tracking for orders will need to be implemented first.
See: Status of quotes, Sales Orders and Purchase Orders Idea