It would look like a bad deal. You're basically saying that your friend believes the code has great value but that he's not being paid what it's really worth so even tho he's selling the code outright he needs some of it back to try and milk it for what it's really worth later on. That doesn't make sense. He should either ask for the right price or only license something narrow like "unique business logic" (just for example) to the client. Exactly what he licences would be determined when feeling out the client, educating them on what's industry norms & possible and offering some pricing options. But you have to push back if the client wants the moon and is only paying for sandwiches.
Licensing deals I've made with clients cover some/all of a.) their ability to transfer the software when they sell their company, b.) their ability to re-sell the software to multiple clients, c.) requirements for identifying me as the author, d.) ability to copy/modify code.
Out of curiosity, does things like this ever actually happen? I heard about this proposal through a friend of a friend, because the company wanted complete ownership, but it didn't mind source code being reused.
Yes. Clients can ask for anything and some developers give them whatever they want. Interestingly, in my experience, the more money a client is paying the less paranoid they act (perhaps because larger outfits have their own software management & developers who understand this stuff better).