Here i am taking this example and i will show you how it works in odoo inventory.
Before that we have to enable the different unit if measure. So,
In the Inventory application, go to Configuration ? Settings. In the Products section, select Some products may be sold/purchased in different units of measure (advanced), then click on Apply.