Soak the beans for 6 hours in water. Then drain the water, replace with new water and boil until slightly softened. Then top up with a little oil and spices to taste.
Separately, fry the chopped onions, carrots and pepper. Once they become tender, season and mix them with the tomato paste. Pour the beans with the water into a deep dish and add the fried vegetables.
Put the beans to bake in a moderate oven until the water boils off almost entirely.