Vinegar always works amazingly against the odor, however it’s entirely natural and safe to use. Baking Soda is also fantastic for neutralizing smells which don’t contains the chemicals. You can use one of them to clean as described below;
Remove all dishes from the dishwasher.
Take a vinegar in cup (full) and put on the top rack.
On the dishwasher as normal washing cycle, while the dishwasher will spray on vinegar it will be thoroughly clean inside and leaves the fresh smell.
Once the normal wash cycle is complete, remove the cup.
Now, sprinkle the handful amount baking soda on the floor of the machine and rerun the normal washing cycle. It will give freshness and good smell in the machine.