Half and peel onions, thinly slice onions in half moons.
Melt butter and oil in Dutch oven set to medium-low heat. Add onions, cover and reduce to low, cook for 30 minutes stirring occasionally.
Uncover (the onions should be translucent). Add salt, pepper and sugar. Increase heat to medium-low, continue cooking for 45 minutes until onions are caramelized.
Sprinkle flour over onions and stir for 1 minute until mixed thoroughly. Add beef broth, bay leaf and wine, bring to a boil. Reduce to a simmer and partially covered, simmer for 1 hour.
Turn off heat and add brandy.
Preheat oven to 350°F.
Divide the soup into oven safe soup bowls. Sprinkle each with a little Gruyere cheese, top with baguette slice and add a little more cheese on top of the bread. Bake 20 to 30 minutes until cheese has melted. Turn on broiler and broil until cheese is slightly golden brown.
Carefully remove from oven and serve.