Dino Lorenzini has a preprint in which he considers "Riemann-Roch structures", roughly as you've laid them out, for graphs. http://www.math.uga.edu/~lorenz/RRNovember11.dvi
Namely, he considers the situation of
(S1) The free abelian group $\mathbf{Z}^n$ (okay, so not infinite... Riemann-Roch also works over a finite field)
(S2) $R\in \mathbf{Z}^n$ an "effective" vector or divisor with coprime integer entries
(S3) degree of a divisor $D$ with respect to $R$ is simply the dot product $R\cdot D$
(S4) the "principal divisors" are chosen to be a lattice $\Lambda$ inside of $\Lambda_R$, the lattice of vectors or divisors perpendicular to $R$
So that if (S6) a canonical divisor exists, there exists a function (S5) $h: \mathbf{Z}^n/\Lambda \to \mathbf{Z}_{\ge 0}$ which satisfies some of your relations and optional requirements called a "Riemann-Roch structure".(This is proposition 2.4)
Of interest and proved by Baker and Norine is that if we take $\Lambda$ to be the image of the LaPlacian matrix of a graph with $n$ vertices and $m$ edges, we get such a structure.

