Cut off the ends of the beans, thread the beans off if necessary, wash them, drain them and cut into pieces about 3 cm long.
Cut the onions and garlic into fine cubes.
Quarter the tomatoes and cut out the stems. Cut the tomatoes into small pieces.
Heat the olive oil in a pan and sauté the onion and garlic cubes in it. Add tomato paste while stirring. Also add the tomato and bean pieces to the pan, add the vegetable stock and let everything simmer for about 15 minutes over a low heat, stirring occasionally without the lid.
Season the bean and tomato sauce with thyme, oregano, salt and pepper and serve.