Aims. We explore the effects of environment in the evolution of late-type galaxies by studying the radial profiles of light-and massweighted metallicities of galaxies in two discrete environments: field and groups. Methods. To study the dependence of metallicity on environment. We use a sample of 167 late-type galaxies, with stellar masses 9 ≤ log(M /M ) ≤ 12, drawn from the CALIFA survey. Firstly, we obtain light-and mass-weighted stellar metallicty profiles, and stellar mass density profiles of these galaxies, using publicly available data. Then we classify them according to their environment into field and group galaxies. Finally, we make a study of the metallicity of galaxies in these two environments which includes the comparison of the metallicity as a function of the radius, at a characteristic scale, and as a function of a the stellar mass surface density. Since metallicity depends on galaxy mass, we take special care throughout the paper in order to compare, in all cases, subsamples of galaxies in groups and in the field that have similar masses. Results. We find significant differences between group and field late-type galaxies in terms of their metallicity, in the sense that group galaxies are systematically more metallic than their field counterparts. We find that field galaxies have, in general, metallicity profiles that show a negative gradient in their inner regions, and a shallower profile at larger radii. This contrasts with the metallicity profiles of galaxies in groups, which tend to be flat in the inner regions, and to have a negative gradient in the outer parts. Regarding the metallicity at the characteristic radius of the luminosity profiles, we consistently find that it is higher for group galaxies irrespective of galaxy mass. At fixed local stellar surface mass density, group galaxies are again more metallic, also the dependence of metallicity on surface density is less important for group galaxies. Conclusions. The evidence of a clear difference on the metallicity of group and field galaxies, as a function of mass, spatial scale, and local stellar mass density, are indicative of the different evolutionary paths that galaxies in groups and in the field have followed. We discuss possible implications of the observed differences.