NiO thin films deposited by DC reactive sputtering were used as anode buffer layer in organic photovoltaic cells (OPVs) based on CuPc/C 60 planar heterojunctions. Firstly we show that the properties of the NiO films depend on the O 2 partial pressure during deposition. The films are first conductive between 0 and 2% partial oxygen pressure, then they are semiconductor and p-type between 2 and 6% partial oxygen pressure, between 6 and 9% partial oxygen pressure the conduction is very low and the films seem to be n-type and finally, for a partial oxygen pressure higher than 9%, the conduction is p-type. The morphology of these films depends also on the O 2 partial pressure. When the NiO films is thick of 4nm, its peak to valley roughness is 6nm, when it is sputtered with a gas containing 7.4% of oxygen, while it is more than double, 13.5nm, when the partial pressure of oxygen is 16.67%. This roughness implies that a forming process, i.e. a decrease of the leakage current, is necessary for the OPVs. The forming process is not necessary if the NiO ABL is thick of 20nm. In that case it is shown that optimum conversion efficiency is achieved with NiO ABL annealed 10min at 400°C.