Phase diagram of a planar XY model with random field