This is actually more some kind of hack, instead of simple cheat. Follow these steps:
Seek for COD2 installation folder on your hard drive (usually C:/Program Files/Activision/Call Of Duty 2) and locate config.cfg file (located under main/players/PROFILE_NAME/config.cfg) and open it using WordPad (start/programs/accessories/WordPad). Locate the line starting with "seta miss_01" (without doublequotes). You'll see 10 "seta miss" lines with its values. Set those values to "10". Lines should look like this:
seta mis_01 "10"
seta mis_02 "10"
seta mis_03 "10"
seta mis_04 "10"
seta mis_05 "10"
seta mis_06 "10"
seta mis_07 "10"
seta mis_08 "10"
seta mis_09 "10"
seta mis_10 "10"
Start your copy of Call Of Duty 2 using modified profile and enjoy playing unlocked levels
To use cheat codes, you'll have to activate ingame console. Do this by entering the Game Options under the game main menu, then enable the console. During gameplay press tilde key (~) to call console window and enter the command developer 1 to enable cheats. Then use the same window to enter one of those:
map <map name> - Loads specific map (level). Maps: 88ridge, toujane_ride, matmata, bergstein, downtown_sniper, libya, duhoc_defend, demolition, downtown_assault, elalamein, decoytown, beltot, trainyard, hill400_assault, moscow, tankhunt, toujane, cityhall, hill400_defend, duhoc, breakout, rhine, crossroads, decoytrenches, eldaba, silotown, newvillers.
god - turns on God mode (immortality)
give ammo - ammo and grenades
give all - All weapons, ammo and health
ufo - Flight mode
noclip - No clipping mode (go through walls)
demigod - Demigod mode
notarget - Ignored by enemies
jumptonode - Teleport to a node
kill - Commit suicide