Place the onion, dried beans, green chiles, garlic, salt, pepper, cumin, stock and water in a slow cooker. (Don't worry about the size of the chopped onion and garlic - you'll puree it when it's done cooking so I just roughly chopped the onions and cut the garlic cloves in half)
Cook on HIGH for 8 hours or on LOW for 12 hours (or 4 hours on HIGH if using canned beans)
Drain the bean mixture into a colander and strain out as much water remaining as possible
Using a potato masher or an immersion blender, blend or mash the beans until you get the desired consistency.