diff --git a/attachment_preview/static/src/js/attachment_preview.js b/attachment_preview/static/src/js/attachment_preview.js index 7bc400e3..1fe7e699 100644 --- a/attachment_preview/static/src/js/attachment_preview.js +++ b/attachment_preview/static/src/js/attachment_preview.js @@ -26,7 +26,7 @@ openerp.attachment_preview = function(instance) attachment_id, attachment_url, attachment_extension, attachment_title) { - var url = window.location.origin + + var url = (window.location.origin || '') + '/attachment_preview/static/lib/ViewerJS/index.html#' + attachment_url.replace(window.location.origin, '') + '&title=' + encodeURIComponent(attachment_title) +