Fry the onion in the olive oil, add the Parma ham, thyme and bay leaf. Remove the pan from the heat and stir in 1tablespoon of flour, return the pan to the heat and cook gently for 3 minutes. Add the tomatoes, season with salt, pepper and sugar and cook for 45 minutes, stirring from time to time.</