All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
It is not permissible for whoever has started performing an obligatory prayer by saying 'Allaahu Akbar' to interrupt his prayer just because of the presence of someone next to him from whom an unpleasant smell comes, like the smell of garlic, onions and the like. Rather, he is obliged to continue his prayer until he finishes while trying to achieve submissiveness and tranquillity in prayer as much as he can. After finishing the prayer, he may then advise that person and admonish him not to harm people and angels with his unpleasant smell.
Allaah Knows best.