In a Dutch oven, over low heat, cook the onion and garlic in the tablespoon of olive oil, until the onion is softened.
Add the tomatoes, tomato paste, chicken stock, sugar, oregano, salt, pepper, bay leaves, and red pepper flakes. Simmer uncovered for thirty minutes. Set aside a cup of the tomato sauce, to top the lasagna with when it comes out of the oven.
Cook the noodles according to the package directions for al dente noodles.
Preheat the oven to 350 degrees.
In a large bowl mix together the ricotta and egg.
In a deep 13x9 baking dish, lay down 4 lasagna noodles. Top them with a quarter of the tomato sauce, a quarter of the ricotta cheese, and a quarter of the mozzarella cheese. Repeat this three times. Top the lasagna with a layer of two cups of the Parmesan cheese.
Bake the lasagna uncovered for thirty minutes.
While the lasagna bakes, make the pesto. In a food processor, process the basil, garlic, pine nuts, the half cup of the Parmesan cheese, a quarter teaspoon of black pepper, and the olive oil. Also, warm up the reserved tomato sauce.
When the lasagna is done, top the first third of it with pesto, top the middle with third with the remaining cup of Parmesan cheese, and spread the tomato sauce on top of the last third.