Heat 1 tablespoon of the oil in a large flameproof casserole dish and cook the onions gently for about 15 minutes until transparent. Lift out half of the onions and set aside. Remove the casserole dish from the heat.
Add layers of potato slices, tomatoes, fish and onions to the dish until all the ingredients are used up, seasoning each layer with salt and pepper as you go. Place the thyme and bay leaf on top.
Pour the fish stock and the rest of the oil over the top. Return the dish to the heat and bring to the boil. Reduce the heat, cover and simmer for 40 minutes, or until the fish and potatoes are tender. Remove the bay leaf and thyme, then serve garnished with fresh thyme.