Your main job is to find the source of the smell. Options could be: ventilation system, carpeting, seats, or headliner. Judging by your description, it's something organic causing the odor (as opposed to gas, smoke, or other stuff).
Is the odor coming out of the ventilation system? Turn it on, and get your nose close to the vents to check if that's the source.
If it is coming from the vents, do the following. Check the cabin air filter, and replace if it's stinky. Take it out, turn the blower on full blast, turn off the recirculate, and spray some Lysol or other disinfectant cleaner into the air intake near the wipers.
Sometimes moisture or water in the ventilation system will make it stinky like decomposition. If there's any organic matter in there, it'll be even worse! Gotta kill the bacteria/fungus living in there, and this might work. That is, if this is the problem, and it's not too advanced.
Probably make it smell like chemicals. But it'll do more than just cover up the smell.
Alternatively, the smell might be under the carpet or in the headliner. If the carpet got really wet, that can create the smell, too. Your job will be to dry it out thoroughly, and kill whatever is making the smell (a thorough steam-clean will kill it, but leave lots of moisture to feed the new stuff). The problem is that once mold, mildew, or fungus get a hold, they come back much more easily.
If it is the carpet, you might try taking the seats out, and steam-cleaning the entire carpet. Then put a dehumidifier inside the vehicle running full blast for 24 hours to drop the humidity quickly. Check the condensation tank often and empty it when it fills up.
Your final choice is to leave a packed ashtray in the car. It'll stink, but at least you're used to it!
