Boil the stockfish in water for 10 minutes, then drain and let cool completely. Remove the skin and bones.
Grease a large baking dish. Layer the ingredients as follows: place half the potato slices on the bottom, then top with half the fish fillets, then half the onion slices. Repeat these layers with the remaining potatoes, fish, and onions.
Sprinkle with pepper, crushed garlic, chopped parsley, and cloves. Drizzle with oil. Use salt sparingly—stockfish is already quite salty.