CP violation in a model with two Higgs doublets