The vendor's unit of measurement (UoM) can be easily converted to your stock unit. You can make purchases in the vendor's preferred UoM and have it automatically converted to your preferred UoM.
To do that you need to open the stock item from the ‘Stock’ section, and in the item's ‘Purchase Terms’ you need to specify the vendor-specific UoM.
Read more on how to convert vendor's units of measurement.