To prepare the salt cod: Rinse the cod well and then immerse it in a container of cold water (cut into chunks, if necessary, to fit). Refrigerate, changing the soaking water 2 or 3 times, until softened (12 to 24 hours, depending on how stiff it was to begin with). Drain the cod, place it in a large saucepan with the onion and the bay leaves, and cover with cold water. Bring just to a boil, reduce the heat to very low, and cover (taste the water at this stage and, if it seems excessively salty, then drain, cover again with fresh cold water, and bring to a boil). Simmer very gently until the fish is opaque and plumped, and falls apart into heavy flakes when prodded, about 20 minutes.
Drain, pat dry, and remove the bones and skin, if necessary. Separate into large flakes and use right away, or refrigerate for up to 2 days before continuing with the recipe.
In a large saucepan of lightly salted boiling water, cook the potatoes whole for about 20 minutes, or until they are tender but not falling apart. Drain and, when cool enough to handle, peel and cut into 1/4 inch slices. In a large heavy skillet, heat 1/3 cup of the olive oil over medium heat. Add the onion rings and, stirring frequently, cook until they are softened and translucent but not browned, about 8 minutes. Stir in the garlic and remove from the heat.
Preheat the oven to 275 degrees F. In a heavy saucepan, reduce the wine by half over medium high heat. Add the fish stock and again reduce by half, then add the cream and reduce by 1/3, so that you have about 2 cups liquid remaining.
Pour this liquid into an earthenware or ceramic casserole about 8 inches in diameter with 4 inch sides. Spread half of the potatoes in the bottom of the casserole, cover them with half of the cod and half of the onions, using a slotted spoon to transfer the onions. Scatter half of the olives over the first layer. Repeat the layer with the remaining potatoes, cod, onions, and olives.
In a small bowl, toss the cheese, bread crumbs, black pepper, and the remaining 2 tablespoons olive oil together, then distribute this mixture evenly over the casserole. Bake for 25 to 30 minutes, or until the top is golden and crisp. If desired, run the dish under a hot broiler briefly to crisp the topping even more. Scatter the parsley over the top and serve directly from the casserole.