I have a few times taken opioids for weeks on end because I had very invasive surgery with quite extraordinary amounts of pain during recovery, and have never felt the desire to take more after the pain stopped being above a very high threshold.
I've known others who have taken opioids for a couple days for something that healed much more rapidly, being very afraid to take them, and had to be sure they disposed of any left because they definitely felt the urge to take more beyond relieving immediate pain.