Parity anomalies on 4D manifolds with boundaries