How current is produced in photoelectric cell? 
*

*In photoelectric cells, a current is detected when photoelectrons reach the electrode on the opposite side of the tube after being emitted. But shouldn't current be detected when photoelectrons leave the first electrode and not just when they reach the second electrode? Because this would create a positive charge on the first electrode which they are emitted from, so a redistribution of electrons in the external wire and therefore a current.

I don't know if I've explained it well enough, so here is a diagram to show what I mean...



*Also, I don't understand how a current is detected when electrons reach the electrode on the opposite side. Is it because of an excess negative charge it gains?


*Why does a potential difference need to be applied to a photoelectric cell if you're not investigating stopping potential? The electrons would reach the other side with their own kinetic energy, so what is the point of the battery in the diagram above?
 A: A current is detected whenever there is a steady flow of electrons across the ammeter. For a steady current to exist you need as many electrons reaching the second plate as the ones leaving the first plate. Otherwise the ammeter will only flicker momentarily. So for the steady state to occur you’ll need to have a constant stream reaching the second plate from the first.
The electrons ejected due the photoelectric effect move in random directions. To maximise the number of electrons reaching the second plate, the external field is added.
A: 
But shouldn't current be detected when photoelectrons leave the first electrode and not just when they reach the second electrode?

Depends on the time scale. At a long enough time scale, microseconds or longer, we can simply say that the current in the circuit starts and stops everywhere all at once, and that will be close enough to the truth.
In order to describe what happens at a sub-nanosecond timescale however, you have to describe the current as a wave that propagates in both directions away from the cathode when a light pulse strikes.
The circle symbol with the "A" label in your diagram represents the current detector. "A" stands for "ammeter" (a.k.a., "Ampere meter.") It could be a physical meter, but more likely, it will be a sensitive amplifier connected to some kind of recording apparatus.
The "ammeter" / "current detector" is going to detect current when the wave passes through. Since it's placed in the left hand side of your drawing, it's going to detect the wave that's propagating on that side of the circuit. That's to say, it will detect the current flowing away from the tube's anode.
If you had placed the ammeter in the right hand leg, it would instead detect the wave of current rushing in to replace the electrons lost from the cathode.
