In a large soup pot, saute the onions in the olive oil over medium-high heat until the onions are soft.
Stir in the chili powder, cumin, salt, and cayenne powder, and continue sauteing for 1 minute or so - just until the spices are fragrant.
Add the beans, oregano, and 1 to 2 cups water (depending on how thick or thin you like your beans). Stir in the bouillon.
Bring the mixture to a boil, then reduce the heat and allow to simmer, stirring occasionally and adding more water if needed to keep the beans from sticking to the bottom of the pan, until the beans are very soft - approximately 1 hour. (After an hour or so they will be ready, but they can also simmer quietly and patiently on the stove for at least 3 hours if needed.).
Using a potato masher, mash the beans until most of them are mashed, and the texture is mostly smooth.