In an 8-quart pot, heat 2 tablespoons of oil and the butter over medium heat until the butter has melted. Add the onions and shallots and stir to coat with oil and butter. Cook for about 15 minutes, stirring occasionally.
After 15 minutes, reduce the heat to medium-low and cook for another 40 minutes, stirring regularly until the onions are a deep golden brown.
Add the garlic and cook for another 3 minutes.
Pour in the wine and bring the mixture to a boil, cook until the liquid is reduced by half.
Add the thyme, beef broth, salt, and pepper and return to a boil. Reduce the heat to low and simmer for 1 hour, stirring occasionally.
About 15 minutes before the soup is ready, preheat the oven to 400 degrees F and arrange the baguette slices on a large baking sheet and brush with the remaining olive oil. Toast for 4 minutes on each side.
Add two baguette slices each into 12 ramekins and ladle the soup over them and then sprinkle them with cheese. Broil under low for about 2 to 3 minutes until the cheese is melted. Watch them while they broil to ensure they do not burn.