Melt the butter in a saucepan and add the onions. Cook over low heat until the onions caramelise, but do not burn them.
Add 30ml of the beef stock and stir, scraping the bottom of the saucepan, until the onions are dry. Repeat this procedure until the onions are dark brown.
Add the remaining beef and chicken stock. Simmer, covered, 20 minutes. Season with salt and pepper then add the sherry. Heat the oven to 180 degrees C.
Divide the soup among six bowls that can go in the oven. Top each with a slice of toasted baguette and a sprinkling of cheese, then bake until the cheese melts.