Fry the onions and ham in olive oil. Add potatoes cut into small cubes and fry for about 5 minutes. Pour part of the stock so that the potatoes are lightly covered. Bring the broth to a boil and then add the pasta. Pour in the stock and cook until the noodles are cooked through. Depending on your taste, add broth to make it more liquid or cook dry. Season with salt and pepper and serve with parmesan cheese.