Mix flour, salt, pepper, and thyme together.
Add sliced onions to the mixture, toss to coat.
Pour 3 tablespoons olive oil into frying pan on med-high heat.
Add coated onions to the oil when it is hot. Cook for 4-5 minutes on each side.
Take off the pan and place the fried onions on a plate lined with a paper towel.
Pour 3 tablespoons olive oil into large sauce pan on medium heat.
Add diced onions and cook until soft, about 3 minutes.
Add mushrooms, salt, pepper, and thyme. Cook another 4 minutes.
Add the sour cream and wine to the mushroom mixture. Stir and heat through.
Toss the green beans with the 1/3 cup flour in large bowl (I use the one left from the onions).
Stir the coated green beans and milk into the sour cream & wine mixture. Heat until bubbling.
Pour the green beans into a greased casserole pan (I use a 9 by 13) and top with fried onions.
Bake at 350 for about 40 - 50 minutes or until bubbling and golden on top.