Heat the oil in a frying pan or saucepan over a medium heat, then add the onion. Cook for a minute, then add a couple of tablespoons of warm water to help the onion to soften. The water will evaporate after a few minutes. Cook for 10-12 minutes over a low heat, uncovered, until the onion softens and turns lightly golden.