Heat the oil in a large saucepan over a medium heat, then add the onion, carrots, celery, leek and garlic and cook slowly for about 15 minutes, stirring now and then, until the vegetables are softened. Stir in the paprika and sugar and cook for another two minutes.
Add the tomatoes, tomato purée, stock or water and a bay leaf, then cover with a lid and bring slowly to the boil. Simmer for about 30 minutes, then add the ham pieces and cannellini beans, cook for another 10 minutes, check seasoning. If the soup is too thick, thin it with a little more stock or water.