Go to your local discount store, Walmart, Kmart or whatever, and get a product called "OUT". Make sure you get the formula with the 'odor eating enzyme'. Remove the old carpet and the padding then thoroughly SOAK the wood floor underneath with this product. Let the liquid product sit on the floor over night. The next day you should find salt like crystals and no odor. If that does not remove the odor, then I would give up and think about replacing the sub floor.
I am both a landlord and a realtor, this is the ONLY product I have found that actually works,and I have tried them all. I don't normally endorse products but this one really works. If you are having the work done by an outside company, I would insist on some sort of a warranty. Again, I have tried every product on the market and this is the only one I have found that works. You can also buy it online but I have had good luck finding it at discount stores as well.