An East Oxford hotel can convert its building into a home after years of falling profit.