Desalt and rehydrate the cod by soaking it for at least 24 hours in cold water, changing the water at least five or six times. In Spain, you can also find salt cod already desalted, so use that if you can to save time.
Once the cod is desalted, shred it into small pieces, removing any bone fragments.
Add 2 tablespoons of olive oil to a large skillet set over medium heat. Sauté the diced onion until it's tender and translucent, about 10 minutes.
Add the shredded cod and black pepper, then sauté for a few minutes. Dump the mixture into a bowl and set it aside.
Start the béchamel sauce by sifting the flour to avoid lumps.
Place the large skillet over medium heat, then add the 4 tablespoons (45g) of butter and the remaining 4 tablespoons of olive oil.
When the butter starts to foam, add the sifted flour and stir continuously to make a roux. Keep cooking and stirring until the roux is browned, smells nutty, and forms a ball, which should take 2-3 minutes.
Gradually add the milk, stirring constantly, until it is incorporated. This will take about 15-20 minutes.
Add the nutmeg and a pinch of black pepper, then mix in the cod and onion mixture. Adjust the seasonings to taste.
Place the dough in a buttered bowl and let it cool to room temperature. Press a piece of plastic wrap onto the surface to prevent a skin from forming, then chill it for at least 4 hours (preferably overnight).
The next day, shape the mixture into small balls or logs with your hands. Coat them in flour, then beaten egg, and finally in breadcrumbs.
Fill a deep, heavy pot with 2 inches (5 cm) of olive oil and heat it to 350°F (176°C).
Deep fry the cod croquettes in batches until golden, about 2-3 minutes. Drain them on paper towels to catch excess grease. Enjoy these crispy treats while they're hot and fresh!