Soak salted cod in cold water overnight or for a few hours. Drain water, repeat. Heat a large pot of water until boiling. Cook cod for 5 minutes; drain and cool, leaving cod in large pieces. Set aside.
Preheat oven to 190 degrees C.
In an 20x30cm casserole dish, layer half the potato slices, all of the cod and all of the onions. Top with remaining potato slices. In a small bowl, mix together olive oil, garlic, parsley, chilli flakes, paprika and tomato puree. Pour evenly over casserole.
Bake in preheated oven for 45 minutes, or until potatoes are tender.