Peel and slice onions. Heat oil in a medium saucepan; add onions, cover and leave to cook on low heat until translucent regularly monitoring cooking process (approximately 30 minutes). If you do not wish to monitor cooking process, add 1.5 dl. of water and remove extra water when onions are set.
Add red wine, sugar, a pinch of salt and a turn of pepper mill. Leave to cook until there is no wine left monitoring cooking process (approximately 1 hour). Reserve and leave to cool in your refrigerator.
Preheat oven to 200°C (400°F). Cut out circles of dough (diameter 7 cm or 2.75 inches). Prick with a fork.
Add a bit of onion confit on each circle and some fresh thyme on top.
Bake for 15 minutes.
Serve warm or cold.