Preheat the oven to 350 degrees. Partially cook bacon. Stir together the baked beans, onion, mustard, ketchup, vinegar and brown sugar. Place in a large casserole dish that has been sprayed with cooking spray. Top with slices of bacon. Bake uncovered for 45 minutes in the preheated oven until the bacon is crisp and beans are bubbling hot.