Preheat oven to 400°F.
In a small bowl, mix together ricotta and mozzarella cheese. Season the mixture with salt and pepper.
Place a sheet of puff pasty onto a paper-line baking sheet. Score the pasty with 1 inch border. Using a fork, prick inside the border. This will allow the edge to puff up while keeping the centre down as it bakes.
Spread the cheese mixture in the centre and layer on mushrooms and leeks. Drizzle veggies with a little olive oil, add sprigs of thyme, and bake for 30-40 minutes until golden brown. Garnish with fresh salt and more thyme before serving.