+1 for the Nat History & Science museums. Also +1 for the Imperial War Museum, but watch out as some galleries (painting & medals) probably aren't entertaining enough for a seven year old. Also, British Museum if things like mummies are of interest, but be prepared for crowds.
If a theatre might be of interest, then might I suggest the Little Angel Puppet Theatre in Islington, as they're aimed specifically at a younger audience.
Another possibility is a football stadium tour if the lad likes the Beautiful Game. I know the Emirates do one (which includes the Arsenal museum in the ticket price), can't say for any of the other London clubs. Would be rather surprised if they didn't.
If cricket appeals, then maybe a day at a county cricket match - you'd have to look up the fixtures - but the Oval is a lovely ground to visit.
Or what about nature reserves? London has several.
London in July is heaving with tourists, so may well be worth looking at things that are off the beaten track. Most London boroughs put on events over the summer, many of them free, so worth looking into things like that as well.
Best bit of advice for exploring London. Take your own picnic / pack up, as food outlets are either overpriced, crowded or both. There're plenty of parks in which to enjoy a nice picnic.