For a sequence \(M=(m_{i})_{i=0}^{\infty }\) of integers such that \(m_{0}=1\) , \(m_{i}\ge 2\) for \(i\ge 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{aligned} p_{M}(m_{1}m_{2}\cdots m_{r}n-1)\equiv 0\ \ \left( \textrm{mod}\ \prod _{t=2}^{r}\mathcal {M}(m_{t},t-1)\right) , \end{aligned}\) where \(\mathcal {M}(m,r):=\frac{m}{\textrm{gcd}\big (m,\textrm{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ødseth and Sellers.