In small mixing bowl, combine milk and soup, stir until completely blended. Set aside.
Coat surface of baking dish with olive oil.
Place layer of potatoes, onions, and ham in baking dish, add salt and pepper and a couple of dabs of butter.
Repeat the above layer one or two times, adding a little flour to each layer.
Add half of milk and soup mixture to dish.
Continue adding layers of potatoes, onions, and ham (with dabs of butter and some of the flower) until all of these ingredients are used.
Add remaining milk and soup mixture to dish.
Cover with aluminum foil.
Bake for 60 minutes.
Remove foil and baked for an additional 30 minutes or until potatoes are tender.
Monitor dish a few times throughout oven-time. Add a bit more milk to dish if it seems dry. Adjust baking time to depth of dish. Deep layers may require additional time while shallow layers may require less baking time.