Metallicity from Type II supernovae from the (i)PTF