Mileage category under Cost of good sold as account type

Mileage category under Cost of good sold as account type

Hi,
I'm trying to add an category for mileage under the type of account Cost of good sold.
I'm able to create my category/account but when I try to add an mileage expense, I have an error message saying the category cannot be used for mileage... 
How to fix this?