Heat oil in a saucepan over medium-high heat. Add onion and fry until starting to caramelise (3-5 minutes). Add sugar and vinegar, bring to the boil for 1 minute, then reduce heat to medium, add chipotles and tomato, and simmer for flavours to infuse (5-7 minutes). Transfer to a blender, process until smooth, season to taste and refrigerate until required. Will keep refrigerated for 2 weeks.