The emission line survey within the Calar Alto Deep Imaging Survey (CADIS) detects galaxies with very low continuum brightness by using an imaging Fabry-Perot interferometer. With spectroscopic follow-up observations of MB>~-19 CADIS galaxies using FORS2 at the VLT and DOLORES at TNG we obtained oxygen abundances of 5 galaxies at z~0.4 and 10 galaxies at z~0.64. Combining these measurements with published oxygen abundances of galaxies with MB<~-19 we find evidence that a metallicity-luminosity relation exists at medium redshift, but it is displaced to lower abundances and higher luminosities compared to the metallicity-luminosity relation in the local universe. Comparing the observed metallicities and luminosities of galaxies at z<3 with Pegase2 chemical evolution models we have found a favoured scenario in which the metallicity of galaxies increases by a factor of ~2 between z~0.7 and today, and their luminosity decreases by ~0.5-0.9mag.