ANY enzymatic cleaner (Kids'n'Pets, Nature's Miracle, etc.) will take care of it. The enzymes break apart/eat/neutralize all biologicals.
You SOAK the area that got some kind of biological contaminant on it (urine, poo, milk, vomit, etc.) after you remove what you can...and let the enzymes get to work. ((You soak the area so that the enzymes get into the carpet AND the padding/backing/subfloor)). Then just throw a towel over the area and let it sit for a few hours or overnight. Remove damp towel in the morning, scrub it drier, and let it air dry.
Voila. No more biologicals in your carpet or padding (or car seats, or mattresses, or furniture, or any other fabric based surface or underlayment). No decaying biologicals = no smell and no bacterial or mold growth.