"Product UoM Category"
This module will allow you to assign UoM category in product template and it will filter the list of default UoM and purchase UoM.