Let $M$ be a module over a commutative ring $R$ and let $N$ be a proper submodule of $M$. The total graph of $M$ over $R$ with respect to $N$, denoted by $T(Gamma_{N}(M))$, have been introduced and studied in [2]. In this paper, A generalization of the total graph $T(Gamma_{N}(M))$, denoted by $T(Gamma_{N,I}(M))$ is presented, where $I$ is an ideal of $R$. It is the graph with all elements of $M$ as vertices, and for distinct $m,nin M$, the vertices $m$ and $n$ are adjacent if and only if $m+nin M(N,I)$, where $M(N,I)={min M : rmin N+IM for some rin R-I}$. The main purpose of this paper is to extend the definitions and properties given in [2] and [12] to a more general case.