2 tbsp plain flour, seasoned with salt and freshly ground black pepper
For the soup, heat the butter and olive oil in a large deep pan and add the onions, garlic and thyme. Fry for 20-25 minutes over a medium-low heat, or until softened and golden-brown.
Add the sherry, two thirds of the brandy and the wine and carefully flambé.
When the flames have died out, add the sugar and beef stock to the pan. Bring to the boil, then reduce the heat and simmer for ten minutes.
Season, to taste, with salt and freshly ground black pepper and stir in the balsamic vinegar and the remaining brandy.
Preheat the grill to high.
For the cheese croûtes, grill the baguette slices on one side, then turn, sprinkle with gruyère and grill until golden-brown and bubbling.
For the compote, heat the oil in a pan and add the red onion. Fry for 5-8 minutes, or until just softened but not too browned.
Stir in the sugar, vinegar and lemon juice and season, to taste, with salt and freshly ground black pepper.
For the shallot rings, place the vegetable oil into a deep, heavy-bottomed saucepan and heat until a small cube of bread sizzles and turns golden when dropped into it. (CAUTION: hot oil can be dangerous. Do not leave unattended.)
Place the shallot rings into a bowl with the seasoned flour and mix well to coat the rings.
Carefully place the shallot rings into the hot oil and deep fry for 1-2 minutes, or until golden-brown and crisp. Remove from the oil with a slotted spoon and drain on kitchen paper.
To serve, ladle the soup into serving bowls and top with the cheese croûtes. Top the croûtes with a spoonful of onion compote and a few shallot rings.