The use of cannabis and cannabis products as an alternative to the use of opioids and opiates carries its own risk. A lot of people do use the cannabis products for symptom relief, and with some symptoms, they may get relief from similar symptoms as they do with the use of opioids.
The research to actually make this sufficiently robust for medical science is limited. Again, I emphasize that there's no single cannabis. We can't ignore individual anecdotes and symptom relief, but as a clear substitute, as we would substitute other things in medical practice, the evidence isn't sufficiently robust.