Add the onions to the oil, season with salt and pepper, and cook until they begin to soften. Add in the garlic and tomato, cook for 2 more minutes. Add one cup of the stock to the pan, scraping up any browned bits. Add the remaining stock, beans, bay leaves, rosemary, and thyme.