Please try the CSR below:
function init() {
SPClientTemplates.TemplateManager.RegisterTemplateOverrides({
Templates: {
Fields: {
"DocumentURL": {
View: function(ctx) {
return window.location.protocol + "//" + window.location.host + ctx.CurrentItem["FileRef"];
},
}
},
},
ListTemplateType: 101
});
}
RegisterModuleInit(SPClientTemplates.Utility.ReplaceUrlTokens("~siteCollection/Style Library/DocURL.js"), init);
init();
You might have to change the column name ('DocumentURL') to the internal name of the corresponding column in your list.
You might have to change the URL in the RegisterModuleInit-function depending on where you upload the script and how you call the file.