Heat the oil and sauté the whole onion and smashed garlic for several minutes. Add the sliced chorizo to the pan and cook for five minutes. Remove the garlic and then add the remaining ingredients except for the beans and peas to the pan. Cook covered until the potatoes are tender. Drain the canned beans and peas and rinse.
Remove the whole onion, then add the beans and peas to the pan and toss gently. Cook for several minutes more or until the beans and peas are hot.