Heat the oven to 200C (180C fan)/390F/gas 6 and drain the soaked beans.
Put the oil, cinnamon, bay leaves and chilli in a medium-sized ovenproof cast-iron pan for which you have a lid, and set it over a medium-high heat. Once hot, add the garlic and cook, stirring, for a minute, until fragrant and lightly coloured. Stir in the allspice, cook for 20 seconds, then add the beans, stock, 200ml water and a teaspoon and a half of salt, and bring up to a simmer. Cover the pan, then transfer to the oven for 50 minutes, until the beans are soft but still retain their shape. Remove the lid, turn up the heat to 220C (200C fan)/425F/gas 7, then bake uncovered for 20 minutes more, so the liquid reduces slightly – it should still be quite brothy.
Meanwhile, make the salsa. Put a well-greased griddle pan on a high heat. Gently toss the onions in a bowl with a tablespoon and a half of oil and a pinch each of salt and pepper, then grill in the hot pan for four minutes on each side, until softened and nicely charred. Tip into a medium bowl, and roughly separate the rings. Toss the tomatoes with a half-tablespoon of oil, and grill for five minutes, turning regularly, until nicely charred and just starting to burst. Tip the tomatoes into the onion bowl, then add the parsley, lemon juice, the last two tablespoons of oil, a third of a teaspoon of salt and a good grind of pepper, and toss gently to combine.
In a small bowl, mix the fried onions and coriander seeds.
When the beans are ready, remove and discard the scotch bonnet, bay leaves and cinnamon; if you like, chop up half or all of the chilli and add it to the salsa, but beware: it is very hot.
Divide the beans between four bowls and top each serving with a large spoonful of salsa, a sprinkle of the fried onion mixture and a lemon wedge.