A completed Delivery Order (done state) cannot be cancelled. So this scenario of returning product to stock would not occur.
If undelivered orders have been cancelled, you can set it back to draft by filtering on cancelled, duplicating them and 'mark to do'