Cook the beans (if using dried): Soak overnight, then boil until soft (about 1–1.5 hours). Drain and set aside.
Fry the onion: Heat oil in a pot and sauté the chopped onion until soft and lightly golden.
Add flavourings: Stir in sugar, vinegar, tomato sauce, chutney, salt, and pepper.
Combine beans: Add the cooked beans and mix well.
Cocer a fuego lento: Add a bit of water and let everything simmer gently for 20–30 minutes until thick and glossy.
Taste and adjust: Balance sweetness and acidity by adding more sugar or vinegar if needed.