reverse output quantity when the item is already transfered to another location

The solution I am afraid has nothing to do with the system. You have told the system you made 10, you then physically move the 10 to a different warehouse. How can you then somehow only have 8 - either check it during output, or you are now faced with writing off 2 in red. You accepted them, the production order did its part and you have moved the stock on. You can only deal with errors where you find them, so write the two off as a stock loss - once in and moved if you wanted financial impact you could use the revaluation on the remaing 8, but that is up to you.