Heat the olive oil in a saucepan, fry the onions over medium heat until translucent, add the garlic, fry briefly. Beans, tomatoes with juice, tomato paste dissolved in 100 ml of warm water, as well as salt, pepper and sugar in the saucepan.
Cover and cook on medium heat for about 20 minutes, then fold in the parsley, cook for another 5 minutes.