Push forward of line bundle and of the associated divisor
Let $X$ and $Y$ be smooth scheme over a Dedekind domain (or over a field if you prefer). Let $f \colon X \to Y$ be a finite and flat morphism and let $D$ be a divisor on $X$. Since $f$ is finite flat, we have a divisor $f_\ast D$ on $Y$ and moreover the sheaf $f_\ast \mathcal O_X(D)$ is invertible (this is not true, see below).
Is it true that $f_\ast \mathcal O_X(D)$ is the invertible sheaf associated to $f_\ast D$?
Edit The question doesn't make sense, since $f_\ast \mathcal O_X(D)$ is locally free but not invertible, as Bruno Joyal pointed out. Indeed its rank is the degree of $f$, let me say $n$. So the new question is the following:
is it true that $\bigwedge^n \left ( f_\ast \mathcal O_X(D) \right )$ is the invertible sheaf associated to $f_\ast D$?
Converting my comment to an answer as suggested above:
If $f : X \to Y$ is a finite map of smooth curves over an algebraically closed field (which is necessarily flat), and $D$ is a divisor on $X$, $\mathscr{L}(D)$ the associated line bundle, then $\det(f_* \mathscr{L}(D)) \cong (\det f_* \mathcal{O}_X) \otimes \mathscr{L}(f_*D)$, where $\det$ is the top exterior power of a locally free sheaf. In particular $\det(f_* \mathscr{L}(D)) \not \cong \mathscr{L}(f_* D)$ in general.