Preheat oven to 350°.
Coat a large skillet with cooking spray; add oil, and place over medium heat until hot. Add onion, and sauté 5 minutes. Add beer; cook 12 minutes or until liquid evaporates, stirring occasionally. Remove onion mixture from heat, and set aside.
Cook potato slices in boiling water for 8 minutes or until crisp-tender; drain. Rinse under cold water, and drain well.
Place one-third of potato slices in an 11 x 7-inch baking dish coated with cooking spray, and sprinkle with half of salt and half of pepper. Spread half of onion mixture over potato slices. Repeat procedure with the remaining potato slices, salt, pepper, and onion mixture, ending with potato slices.
Place flour in a bowl. Gradually add milk, stirring with a wire whisk until blended. Pour milk mixture evenly over potato slices. Cover with aluminum foil, and cut 3 (1-inch) slits in foil. Bake at 350° for 45 minutes. Uncover; sprinkle with cheese, and bake an additional 10 minutes or until cheese melts.