Preheat the oven to 200°C.
Cut the onion into wedges, the red pepper into chunks, the garlic into thick slices.
Put the chicken pieces in a baking tray. Tuck the onion, garlic and red pepper between them. Season with salt and pepper and scatter the herbs on top.
Drizzle with the oil then bake in the oven for 20 minutes, or until the chicken skin looks golden.
Take the tray out and pour over the vinegar. Add the tomatoes, together with a tin of water, using the tomato tin.
Turn down the oven to 170C, cover the tray with foil and slowly cook for 30 minutes, until you get a thick sauce.
Remove the foil, mix in the beans and bake for another 5-10 minutes.
Scatter the fresh herbs on top, just before serving.