Make the batter by putting the flour in a bowl, drop in the egg and start to work it into the flour, adding
Poach the fish according to the recipe for brandade de morue. Discard the skin and bones and place the cod in a colander to dry off.
Heat half the olive oil in a pan large enough to hold the fish. Soften the onions, garlic and tomato over a low heat until soft and jam-like. Add the bay leaves, potatoes and olives. Just cover with water, bring to the boil and cook until the potatoes are tender. Taste for salt, but remember the cod will be salty too.
When they are nicely browned, transfer them to the pan with the potatoes, heat through, scatter on the parsley and serve hot.