Cover the beans with cold water and soak overnight.
Heat the olive oil in a large soup pot. Add the onions, garlic, oregano, basil, and bay leaves. Cook over low heat, stirring occasionally, until the onions and garlic are soft and translucent, 10 to 15 minutes.
Add the tomato paste and tomato purée, and cook another 5 minutes.