In a pot, heat the oil over the stove. Add the chicken, onions, and parsley. Stir for a little while. Then, add water, salt, and black pepper. Let the chicken cook until it is fully done.
Once the chicken is cooked, remove the bones. Keep the chicken cooking water (broth) to the side.
Pour the chicken broth back into the pot and heat it. Add the finely chopped almonds, sugar, and cinnamon. When it starts to boil, add the whisked eggs.
Let the mixture cook, stirring from time to time, until the water is gone and you have a thick, dense mixture.
Preheat your oven to 180°C (350°F).
Place a layer of pastilla sheets in an oiled or buttered baking tray. Spread the chicken and onion mixture over it (this is the first layer).
Repeat the process: add another layer of pastilla sheets, then a layer of the egg and broth mixture. Keep repeating these layers until you have used all the filling.
Brush the top layer with melted butter. Bake in the oven until the top is golden brown.
Place the pastilla on a serving plate and garnish with powdered sugar and cinnamon.