Soak the salt cod in plenty of cold water overnight, changing the water about 3 or 4 times.
Drain the salt cod and place in a medium pot with the garlic, bay leaf and onions. Cover with fresh water by 2 inches. Bring the water to barely a simmer and cook the cod gently for about 20 minutes. Taste the cod; if it is soft and not too salty, remove it from the water, break it up into large flakes and discard any bones. If the cod is still very salty, break it up into 3 or 4 pieces and discard the water. Put the cod pieces back in the pot with fresh water. Bring to a simmer again, turn off the heat and let sit for about 5 minutes. Repeat until the cod reaches your preferred level of saltiness.
Whisk together the olive oil, vinegar, lemon juice and salt and pepper to taste in a large bowl. Add the red onions and cooked cod to the dressing.
Put the potatoes in a medium pot with salted water to cover. Bring to a boil and simmer until the potatoes are tender enough to be pierced easily with a paring knife, about 10 minutes. Drain and let cool slightly, about 5 minutes. When cool enough to handle but still warm, peel the potatoes and slice them into 1/4-inch rounds. Add them to the bowl with the cod and toss gently. Allow to cool.
Add the cherry tomatoes, parsley and avocados to the bowl with the cod and toss to coat. Season with salt and pepper. The salad can be served immediately, or allowed to sit for about an hour for the flavors to meld.
If you're in a hurry and can't soak the cod overnight, put the cod in a pot with water and bring to a simmer. Turn off the heat and let sit for 5 minutes. Repeat about 3 or 4 times until the cod is tender and at your preferred level of saltiness.