Preheat your oven to 160 C (325 F). Grease a 9x13 baking dish with butter or cooking spray.
Heat the butter in a non stick pan on medium heat, when hot, add the onion and saute until soft and translucent.
In a large mixing bowl, add the beans, cooked onion, ketchup, mustard, molasses, and brown sugar. Stir to mix everything together.
Pour beans into the prepared baking pan.
Take the bacon slices and cut them in half or thirds, place the bacon pieces in a single layer on top of the beans.
Bake for 2 hours. If the top is caramelized the beans are ready, if not, continue baking and check at 2 1/2 hours or 3 hours.
Serve and enjoy.