Place butter and oil in a medium pot over medium heat. When butter is melted add onions, stirring to coat in the butter mixture. Place a lid over the top of the pot and let the onions simmer for about 15 minutes, until onions are opaque and softened.
When 15 minutes is up, remove the lid and let the onions saute in the pot. You cant turn the heat up just a bit to help them caramelize. Let them cook for another 20-30 minutes. Be sure to continue stirring to scrape up all of the brown bits. If pot becomes dry add a little more oil to help prevent the onions from frying in the pot. Season with salt and pepper.
Once onions are caramelized add garlic and saute for a minute or two to release the flavors. Next, add brandy or cognac to the pot and let the onions deglaze. After about 5 minutes or so add the broth, bay leaf and, thyme to your pot. Bring to a boil and then cover and reduce heat to low. Let the soup simmer for 15 minutes.
While soup is simmering place bread slices on a cookie sheet. Sprinkle each slice with parmesan cheese and place under the broiler until the bread is toasty brown and cheese is melted. Remove from the oven and place each slice in an oven proof bowl. Note: of the slices don't fit break them in half.
In a medium bowl add the shredded parmesan and gruyere cheese. Mix well. When soup is done cooking ladle it into each bowl and sprinkle with the cheese mixture. Make sure to get a good amount of cheese on top. Place the soup under the broiler until melted and bubbly.
Serve nice and hot from the oven.