If you read my reply, then you can see I've written a word "accordingly as per your requirement".
How can system know that you want to post the stock in unrestricted or quality inspection ?
You have to notify that in your system.
Either you have to change the option in material master or in PO - Stock Type accordingly as per your requirement.
If your requirement is fixed like a ratio like as 1:1, then may be it can be achieved through a user exit or badi.
By using an exit / badi, you can use your own logic to use the stock type in PO.