I'm not sure about babies and toddlers but, for me it was a hormone imbalance (I was about 50 when it started). I started using over the counter progesterone cream (comes in prescription strength as well). According to the directions on the jar (I actually use less, about 1/2 reccomended). For me the "onion B.O." went away almost immediately. Talk to your doctor first to make sure it's OK for your child. I also remember reading someone's post when I was first looking into my problem that a newborn aquired the onion body odor from his mothers breast milk. Aparently she craved a hoagie just after delivering him.
My 6-month old son has developed an onion smell under his arms. We are going to the ped. tomorrow, though she is thinking it is a rash. There is not a rash, just a foul onion odor, similiar to old-man B.O. Despite washing him, and adding baby powder he continues to smell. I would like to see a ped. Endocronologist (spelling?) to rule out early puberty as crazy as that sounds....it can also be something in the hypothalmus, as this is where sex hormones stem from....? I'm not a dr., but have never heard of a baby with smelly underarms.