Sweat the leeks in a little water for 2-3 minutes, shaking the pan occasionally. Strain and transfer to a heatproof casserole. Fry the onions in the olive oil for 4-5 minutes. Add the tomato purée and stir for 1 minute. Add the garlic and parsley, sprinkle with salt and sugar, stir and remove from the heat.
Spread the onion mixture over the leeks, add the stock and cover the casserole.