Grab a large spot and add 2 tablespoons of olive oil on medium heat, add the onions, and toss to coat with the oil.
Cook the onions, stirring often, until they have softened; about 15-20 minutes.
Increase the heat to medium-high. Add the 2 more tablespoons of olive oil and the butter and cook until the onions start to brown; about 10 more minutes.
Next add the sugar and 1 teaspoon of salt. Continue to cook until the onions are well browned: about 10 more minutes. This will help complete the caramelization process.
Add the minced garlic into the onion pot and cook for a minute more.
Add the white and red wine to the pot and scrape up the browned bits on the bottom and sides of the pot.
Add the beef stock, bay leaves, and thyme.
Bring the soup to a simmer, cover the pot and then lower the heat to maintain a low simmer; cook for about 30 minutes.
Add freshly ground black pepper and discard the bay leaves before serving.
Preheat the oven to 450°F
Take a baking pan and line with parchment paper or foil.
Brush both sides of the French bread slices lightly with rest of the olive oil.
Put in the oven and toast until lightly browned; about 7 minutes and then remove from oven.
Turn the toasts over and add some grated Gruyere cheese and Parmesan.
Return to oven when it's close to serving time and bake until the cheese is bubbling and lightly browned.
Ladle the soup into a bowl and place one cheesy French toast onto the top of each bowl of soup.