  For a sequence $M=(m_{i})_{i=0}^{\infty}$ of integers such that $m_{0}=1$,
$m_{i}\geq 2$ for $i\geq 1$, let $p_{M}(n)$ denote the number of partitions of
$n$ into parts of the form $m_{0}m_{1}\cdots m_{r}$. In this paper we show that
for every positive integer $n$ the following congruence is true: \begin{align*}
p_{M}(m_{1}m_{2}\cdots m_{r}n-1)\equiv 0\ \ \left({\rm mod}\
\prod_{t=2}^{r}\mathcal{M}(m_{t},t-1)\right), \end{align*} where
$\mathcal{M}(m,r):=\frac{m}{\gcd\big(m,{\rm lcm} (1,\ldots ,r)\big)}$.
  Our result answers a conjecture posed by Folsom, Homma, Ryu and Tong, and is
a generalisation of the congruence relations for $m$-ary partitions found by
Andrews, Gupta, and R{\o}dseth and Sellers.
