If you smell bad dishwasher odors after running a cycle, don't reach for the bleach bottle. Bleach is very corrosive to metal parts and doesn't solve the root problem. The smell comes from bacteria that feed on trapped food and grease in the strainer screen at the bottom of the machine, in the jets in the sprayer arms and along the bottom edge of the door.
Start by cleaning and rinsing out the screen at the bottom of the tub (Photo 1). Next, clean out any food lodged in the ports of the sprayer arm (Photo 2). Then clean off the bottom edge of the door and the metal lip area that sits below the door (Photo 3). You'll be surprised at how much crud is there.
Once you've cleaned those areas, throw in a bottle of dishwasher cleaner and disinfectant (Dishwasher Magic; order from amazon.com) and run a full cycle with no dishes or dishwashing detergent (Photo 4). Keep those critical areas clean in the future and your stinking problem won't come back.