When does a scheme admit an affine quasi-compact open covering? Let $X$ be a scheme. A morphism $f: Y\to X$ of schemes is said to be a quasi-compact if the pre-image of any quasi-compact open is quasi-compact. We define an open covering $f: U\to X$ to be a surjective morphism which is locally (on the source) an open immersion.

Given what properties of $X$ can we produce a quasi-compact open covering $f:U\to X$ with $U$ affine?

Basically I want to prove such a statement for a quasi-affine scheme $X$, which by definition is a scheme which can be embedded using an open immersion into an affine scheme.    
It does not seem that the case of quasi-affine is any easier and I was wondering if it can be proved in the general case. A cursory search across the internet does not produce any results. Even the section on quasi-compact schemes in EGA1 is quite brief.
 A: This is equivalent to $X$ quasi-compact and quasi-separated (I will abbreviate this as qcqs sometimes). First, a detour about open coverings: a standard Zariski open covering (where the map from every connected component is globally an open immersion) is probably equivalent to the corrected form of your definition, but it might be stronger, and I'll show that we can always get the (potentially stronger) Zariski open covering if we assume qcqs and conversely, if we have a surjective quasi-compact map from an affine scheme (a weaker assumption than your open covering), then $X$ must be qcqs.
Let us introduce the term quasi-separated and a couple of lemmas:
Definition: Let $f:X\to S$ be a morphism of schemes. We say $f$ is quasi-separated if the diagonal morphism $\Delta_{X/S}:X\to X\times_SX$ is quasi-compact.
We say that a scheme is quasi-separated if the canonical morphism to $\operatorname{Spec} \Bbb Z$ is quasi-separated.
Lemma 1: Quasi-compact and quasi-separated morphisms are preserved by arbitrary base change and composition.
Proof: See 01K5, 01K6, and 01KU. $\blacksquare$
Lemma 2 (Stacks 03GI): Let $f:X\to Y$ and $g:Y\to Z$ be morphisms of schemes. If $g\circ f$ is quasi-compact and $g$ is quasi-separated then $f$ is quasicompact.
Lemma 3: Let $X,Y$ be topological spaces, and let $f:X\to Y$ be a surjective continuous map. If $X$ is quasi-compact, then $Y$ is quasi-compact.
Proof: This is a specialization of Stacks 04Z9, for instance, or you can prove it yourself directly by picking an open cover and taking a finite refinement on $X$. $\blacksquare$
Lemma 4: Suppose $f:X\to Y$ is a surjective, quasi-compact morphism of schemes. If $X$ is quasi-separated, then $Y$ is also quasi-separated.
Proof: Our goal is to show that the morphism $\Delta: Y\to Y\times Y$ is quasi-compact. Consider the following commutative diagram:
$$\require{AMScd}
\begin{CD}
X @>{\Delta_X}>> X\times X\\
@VVV @VVV \\
Y @>{\Delta_Y}>> Y\times Y
\end{CD}$$ 
We have that the left vertical arrow is surjective quasi-compact by assumption, and that the right vertical arrow is surjective quasi-compact because it may be written as the composition $X\times X\to X\times Y \to Y\times Y$, and the conditions of surjective and quasicompact are preserved by composition and arbitrary base change.
Now the top horizontal arrow is quasi-compact by assumption, and we want to conclude the bottom arrow is. Take any quasi-compact set $V\subset Y\times Y$. By considering the preimage via the composition $X\stackrel{\Delta}{\to} X\times X\to Y\times Y$, we see that the preimage of $V$ in $X$ is quasicompact. On the other hand, this preimage surjects on to the preimage of $V$ inside $Y$, and so by lemma 3, $\Delta_Y^{-1}(V)$ is quasi-compact inside $Y$, and we are done. $\blacksquare$

Now to show the equivalence. If our scheme $X$ is qcqs, we can construct a particularly nice open cover. Take any affine open cover $\{U_i\}_{i\in I}$ of $X$, and by quasi-compactness we may assume that $I$ is finite. Now we claim that $U:=\bigsqcup_{i\in I} U_i$ with the map $U\to X$ being the disjoint union of the canonical open immersions $U_i\hookrightarrow X$ is a quasicompact open covering. We apply lemma 1 to the sequence of morphisms $U\to X\to \operatorname{Spec} \Bbb Z$. As the composite is a morphism of affine schemes, it is quasi-compact, and as $X$ is quasi-separated, the second morphism is quasi-separated, so we may apply the lemma to see that $U\to X$ is quasicompact.
Conversely, if there is such a morphism, then $X$ must be quasi-compact by lemma 3 plus the fact all affine schemes are quasi-compact. Then by applying lemma 4, we get that $X$ must by quasi-separated too, so we're done.

Now to the case of a quasi-affine scheme. We assume that you have represented your scheme $X$ as an open subset of an affine scheme $Y$ with closed complement $Z$. Let me first remark that any Noetherian scheme is qcqs, and any locally closed subscheme of a Noetherian scheme is again Noetherian, so if you're working in the world of Noetherian schemes, $X$ is automatically qcqs and the above results apply. If you're not working in the Noetherian case, then the fact that affine schemes are separated, every locally closed subscheme of a separated scheme is separated, and separated implies quasi-separated means that all you need to check is quasicompactness, which is equivalent to the existence of a finite generating set for ideal cutting out $Z$.
(This was a fun question to think about - thank you for the stimulation.)
