'The UoM category and factor are required, so we\'ll have to add temporary values
for imported UoMs'

@api.model
def name_create(self, name):

    values = {self._rec_name: name, 'factor': 1}
    if (not self._context.get('default_category_id')):
        EnglishUoMCateg = self.env['product.uom.categ'].with_context({})
        misc_category = EnglishUoMCateg.search([('name', '=', 'Unsorted/Imported    Units')])
        if misc_category:
            values['category_id'] = misc_category.id
        else:
            values['category_id'] = EnglishUoMCateg.name_create('Unsorted/Imported    Units')[0]
    new_uom = self.create(values)
    return new_uom.name_get()[0]
