To prevent bad odours, you need to make sure you're using a suitable washing programme for the level of soiling on your dishes and the quantity of dishes you're washing.
It's also important to make sure your dishwasher is not overloaded as this – and incorrect stacking – can cause poor washing results. So you've got reason to be annoyed if someone's stacking isn't up to scratch.
Lastly, learning how to clean a dish3washer will keep bad smells at bay.