In a 10-quart stockpot, melt the butter over low heat. Add the oil, onions, and salt, and stir to coat the onions. Cook, covered, over low heat, stirring occasionally so the onions do not scorch, just until the onions are soft but still pale, about 15 minutes.
Sprinkle the flour over the onions and stir to coat the onions. Immediately add the stock, wine, the white pepper, thyme sprigs, and bay leaves. Bring just to a boil. Immediately reduce the heat to low. Simmer, partially covered, for 30 minutes. Taste for seasoning. (The soup can be prepared up to this point 1 day in advance. Refrigerate in a covered container. Reheat gently at serving time.)
Preheat the broiler.
Ladle the soup into individual ovenproof soup bowls. Top each serving with a slice of toasted baguette. Cover the bread with a thick coating of grated Gruyere. Place under the broiler. As soon as the cheese begins to bubble, serve the soup.