All paint has an odor associated with it. Solvent based products have a strong smell and even latex paint will have an odor; just not as strong. What we are discussing is paint that just smells awful. I have had people often ask me why paint sometimes smells like bad milk.
On commercial job-sites I have employees bring smelly paint to my attention and think someone has urinated into open five gallon buckets of paint. Which does happen believe it or not.
The culprit is bacteria. Just like with milk, bacteria will grow in a latex product and produce a strong odor. This normally happens in an older open can of paint but can also occur in any open can where bacteria can get introduced and grow.
Smelly paint is often an indication of bacteria growth. In solvent based products this is not a problem because the solvents kills bacteria. You can sometimes use the product if there is no visible growth or mold but my suggestion is to get rid of it. It is possible to transfer that odor to what you are painting even if the paint appears to be good in all other respects.
If you have already applied a latex product that has an odor to it and it appears sound in all other respects, the fix is to apply a sealer. Preferably a solvent based one and repaint. I would suggest tinting the sealer to your finish coat to make coverage easier when you repaint.