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:

1. *$P$ is true for affine schemes.* http://stacks.math.columbia.edu/tag/01S7

2. *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). 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}$.