Model for the magnetic transition in UPdIn