Cut the onion into half rings and fry in olive oil until soft, 7-10 minutes.
Crush the cheese. Beat eggs lightly and combine with cream, thyme, salt, and pepper.
Grease a shallow baking dish 24–26 cm in diameter with butter. Roll out the dough 3 mm thick and transfer to the baking dish, covering the bottom and sides. Use a fork to prick the dough and trim off any excess.
Cover the dough with baking paper and cover with dry beans or peas. Bake at 200 ° C for 10-15 minutes. Remove beans and paper.
Place the onion on top of the dough base. Spread the cheese on top. Pour in the creamy egg mixture and bake at 180 ° C until golden brown, 20-25 minutes. Let cool, 15 minutes, before serving.