Peel and slice the onion. Heat 5 tablespoons of extra virgin olive oil in a large pan and add the onion. Sauté the onion until it is soft, for 15 or 20 minutes. Remove the pan from the heat and add the sweet paprika so that it does not burn.
Stir to mix it with the onion and put the pan back on the heat. Add the brandy, leave it to reduce for 2 minutes and remove.
Peel the potatoes and cut them into thin slices, frying them until they are still slightly raw, as they will finish cooking in the oven. Set aside.
Next, remove the excess oil left by the potatoes in the pan, and lightly fry the floured cod fillets.
In an oven dish, assemble the ingredients. First place the potatoes as a base, with the cod loins on top, adding the onion and its sauce on the top and sides.
Bake at 380ºC for 15 to 20 minutes. Afterwards, remove from the oven and serve hot.