Preheat the oven to 200C/400F/Gas 6 and put a lipped baking tray (as the pie may leak a little butter) on the middle shelf to heat up. Use a little butter to grease a 20cm/8in springform cake tin (about 7cm/2¾in deep).
Heat 25g/1oz of the butter in a large frying pan. Add the onion and gently fry over a low heat for around 20 minutes, stirring often, until very soft and golden-brown. Season with a little salt and pepper and set aside.
Put the sliced potatoes in a large saucepan and cover with the milk. Bring to the boil, lower the heat and simmer for about five minutes, or until the potatoes are just tender but not cooked through.
Drain the potatoes, reserving 100ml/3½fl oz of the milk.
Melt the remaining butter. Put one sheet of filo pastry in the cake tin, leaving the excess hanging over the side. Brush lightly with the melted butter then turn the tin slightly and repeat with the rest of the sheets.
Put one-third of the potatoes into the pastry-lined tin and season with a little salt and pepper. Follow with half the onions and then half the flaked fish. Repeat these layers, then finish off with the final third of potato.
Mix the reserved milk with the cream and pour over the filling.
Fold the overhanging pastry back over the filling to enclose it, and brush the top of the pie with melted butter. Place the pie on the hot baking tray in the oven and bake for 30–35 minutes, or until the filo is crisp and golden-brown.
Leave the pie to stand for 30 minutes or so – it’s best eaten warm or at room temperature – then transfer to a deep plate before slicing.