This is probably not what you look for, but you may denote $N=\prod p_i$, $m_i=N/p_i$, then consider a polynomial $$q(x)=\prod_i (x^{m_i}+x^{2m_i}+\dots+x^{(p_i-1)m_i}).$$ Your generating function equals $$\frac{q(x)\pmod {1-x^{N}}}{1-x^{N}}.$$