First, peel the onion and chop it coarsely. Heat the olive oil in a pot and sauté the onion cubes. When they are nice and transparent, add the peeled tomatoes. Add them whole and with the liquid.
Add salt, pepper, sugar and simmer for half an hour without a lid. Now that some of the liquid has boiled away, finely puree the rest with a blender. Depending on how thick or less thick you like the sauce, you can thicken it with tomato paste. Just before serving, add some chopped basil.