You need to use psychological conditioning. Read up on the psychologist Pavlov, and more specifically his study named Pavlov's Dogs. Basically, you need to show your dog the leash, then when he barks, punish him some how (like squirt him with some water), but be careful, if you do it wrong, he might start to fear the leash. The important thing here is to reward him for seeing the leash and not barking, bacon works as a good reward to train a dog for this. Note: If you decide to spray him with water when he barks, you must do it while he's barking, otherwise he won't understand why he's being punished and will just be confused and scared.