Even onions can be elegant when presented in a beautiful tart.
Preheat oven to 400 degrees Fahrenheit.
Cut the puff pastry sheet in half. Roll out one half sheet of flaky dough to fit a 13-inch-long rectangular tart pan. Press the dough in and up the sides, trimming any overhanging dough. Prick dough all over with a fork. Bake for 10 minutes.
Remove from oven. Lower the oven temperature to 350 degrees Fahrenheit.
Heat oil in a large skillet. Add onions and leeks and sauté, covered, until translucent, stirring occasionally. Remove from heat and allow to cool. Once cooled, add the eggs, flour, salt and pepper to taste. Mix until well-combined.
Spread filling over the par-baked flaky dough. Roll out the remaining dough and use a lattice roller to cut an instant lattice. Place over filling and crimp the edges to the edge of the bottom dough.
Brush with beaten egg and sprinkle the lattice design only with poppy seeds. Bake at 350 degrees Fahrenheit for one hour.