In a large pot bring 3 quarts of water to a boil. Add the green beans and cook for about 2 minutes. Remove and place in a bowl of ice water, this will stop the cooking process and keep the beans crisp.
In a large skillet cook the bacon until crisp. Remove the bacon and set aside, add the onions and cook until soft, stirring them so not to brown them. Stir in sugar and flour until blended and smooth. Add vinegar and beef stock, whisking until thick and bubbling. Add the bacon and beans.
Let simmer about 3 minutes until hot and season with salt and pepper.