Put sliced onion into a bowl, drizzle it with the lime juice, and season to taste with salt. Cover and set aside.
Pour the stock into a saucepan, set over medium heat and stir in the achiote paste until it has dissolved. Add the chiles and acuyo leaves and bring to a boil.
Reduce the heat, add the chicken and simmer for 15 minutes. Transfer the chicken to a roasting pan, brush with the oil, and roast for about 40 minutes, until cooked through. Remove it from the oven and cover it with aluminum foil to keep it warm.
In the meantime, remove the acuyo leaves from the pan with a slotted spoon, put them into a food processor or blender, and process to a thick paste. Add a little stock to loosen if needed. Transfer the paste to a bowl.
Remove the chiles from the pan with a slotted spoon and put them into the food processor or blender. Add enough of the stock to cover and process until thoroughly combined. Pass through a strainer (sieve) back into the pan with the stock.
Stir in the masa dough into the pan and simmer, stirring continuously, for 15 minutes or until the stock has thickened into a sauce. Season to taste with salt and pepper.
Cook the green beans and zucchini (courgettes) in a saucepan of lightly salted boiling water for 5 minutes, then drain and set aside.
To serve, carve the chicken. Ladle a generous portion of mole sauce onto individual plates. Top with the chicken and serve immediately with the vegetables, onion, and acuyo paste.