Peel the potatoes and cut into slices. Peel and finely chop the onions. Crack the eggs and whisk with salt and pepper.
Heat half of the oil in a pan and cook the potato slices and onions in it over medium heat for about 25 minutes (do not fry).
Season the potatoes with salt and pepper. Then let cool a bit and add to the eggs.
Heat the rest of the olive oil in a pan and add the egg and potato mixture. Allow to set for about 6 minutes.
Place a plate on the pan and quickly turn it over. Slide the potato omelet back into the pan and cook on the other side.