If using dry beans, soak them overnight. When doubled in size, drain from the water and transfer to a large pot with water, garlic and bay leaves (ratio of water to beans 3:1) Bring to a boil over medium heat, reduce to a simmer, and cook for 1.5 /2 hours stirring form time to time. Drain the beans and put them back into the pan and keep some of the water.
If using canned beans, drain the ware but don’t rinse the beans. Add them to a pot, cover them with water and cook for 3 minutes. Drain and put them back into the pan and keep some of the water.
Preheat the oven to 200C/400F.
In a pan, heat up the sunflower oil. Then add the sliced onions and a pinch of salt. Let the onions cook until nice and caramelised, about 15/20 minutes. Remove from the heat and add paprika, the vegeta seasoning and pepper and mix to combine. You don’t want to add paprika at the beginning because it is sensitive to the heat and it can burn quickly and become bitter.
Add the onions to the bean pot and mix to combine.
Place half the mixture in a baking tin, add the bay leaves and cover with the rest of the beans and pat them down so they are all in an even layer.
Pour the beans cooking water over it until barely submerged.
Transfer to the oven and cook for 45 minutes, until most of the liquid has evaporated and its browning on top.
You can use the grill for the last 2 minutes to get a nice deep color on top, but keep an eye on it so that it doesn’t burn.