Heat oil over medium heat. Add onions and sweat. Add bacon and cook until bacon is crispy and fat has rendered. Add beans, thyme, salt, pepper, & chicken stock. Cook over medium heat for about 40 minutes to an hour until beans are tender. Do not allow to boil; beans should be on simmer. Add more stock if needed. Check seasoning and add salt and pepper, if desired.