Yes, such a property $P$ exists, namely "being qcqs" (i.e., quasi-compact and quasi-separated). It is trivial that qcqs answers your question, if it indeed satisfies your conditions on $P$.
Let's check the conditions:
$P$ is true for affine schemes. http://stacks.math.columbia.edu/tag/01S7
If $P$ holds for $U_{1}$, $U_{2}$, $U_{12}$ as above, then it holds for $X$. The qc part is (easy) topology. For qs one can use http://stacks.math.columbia.edu/tag/01KO, and see that #3 is satisfied for $X$. Indeed, take $S = \mathrm{Spec}(\mathbb{Z})$, and cover it with the trivial covering $\mathrm{Spec}(\mathbb{Z})$. The rest of the lemma says that we have to cover $X$ with affine opens $V_{j}$: well, we may (and do) choose the $V_{j}$ to all be in $U_{1}$ or $U_{2}$. All we need to check is that $V_{j} \cap V_{j'}$ is covered by a finite number of affine open subsets of $X$. Well, take any such cover $W_{k}$. Suppose $V_{j} \subset U_{i}$, and $V_{j'} \subset U_{i'}$. We have $$ V_{j} \cap V_{j'} = (V_{j} \cap U_{i}) \cap (U_{i'} \cap V_{j'}) = V_{j} \cap (U_{i} \cap U_{i'}) \cap V_{j'}. $$ On the right hand side everything is qcqs (either because affine, or by assumption) [edit:] and all intersections take place in qcqs schemes (namely $U_{i}$ and $U_{i'}$) [/edit]. Hence so is the intersection, and therefore $V_{j} \cap V_{j'}$ is qcqs (in particular qc). This allows us to take a finite subcover of $W_{k}$.
Edit: The last paragraph was not very well-phrased. The point is that a priori $V_{j} \cap V_{j'}$ need not be qcqs (even though both $V_{j}$ and $V_{j'}$ are qcqs). After all, the intersection takes place in $X$, and we do not know that $X$ is qcqs. (Indeed, it is what we are trying to prove.) However, we know that $V_{j} \subset U_{i}$, and $V_{j'} \subset U_{i'}$, and this makes it possible to rewrite the intersection into intersections taking place in qcqs schemes. And of those, we know that the intersection is qcqs: item (6) of http://stacks.math.columbia.edu/tag/01KU.