Rub 75g of the cold butter into the flour with a good pinch of salt until the mixture looks like fine breadcrumbs. Stir in the milk and bring everything together into a firm dough, wrap it and chill for 30 minutes.
Heat the oven to 200C/180C fan/Gas 6. Roll out two thirds of the pastry on a floured surface and use it to line a 20cm pie dish.
Layer the sliced potatoes and onions in the dish, seasoning every layer generously and dotting the remaining 25g butter, cut into small pieces, over the layers as you go.
Roll out the rest of the pastry and lay it over the filling. Seal the edges, crimp them with your thumb or a fork, and cut a small steam hole in the middle.
Bake for 45-50 minutes until the pastry is golden and a knife slides easily through the potato layers with no resistance.
Rest the pie for 10 minutes before slicing so the layers hold together. Serve with pickled beetroot, a fried egg or a big spoon of brown sauce.