diff --git a/web_widget_image_download/README.rst b/web_widget_image_download/README.rst index f714914b..cc5f3782 100644 --- a/web_widget_image_download/README.rst +++ b/web_widget_image_download/README.rst @@ -26,6 +26,7 @@ Known Issues / Roadmap ====================== * In order to work correctly, this widget has to detect image type, the server should include this information in the `Content-Type` header. Right now, odoo is not doing so, but a fix has been `proposed `_. +* For some unknown reason, the widget does not work in the `Preferences` view, because odoo is not rendering the **QWeb** template. Bug Tracker =========== diff --git a/web_widget_image_download/__init__.py b/web_widget_image_download/__init__.py index e69de29b..c222227a 100644 --- a/web_widget_image_download/__init__.py +++ b/web_widget_image_download/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- +# Copyright 2016 Flavio Corpa +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). diff --git a/web_widget_image_download/static/src/js/web_widget_image_download.js b/web_widget_image_download/static/src/js/web_widget_image_download.js index adaf7995..bf2754bd 100644 --- a/web_widget_image_download/static/src/js/web_widget_image_download.js +++ b/web_widget_image_download/static/src/js/web_widget_image_download.js @@ -16,7 +16,7 @@ openerp.web_widget_image_download = function (instance) { $.ajax({ type: 'HEAD', url: this.imgSrc, - complete(xhr) { + complete: function (xhr) { // retrieve image type from server ("Content-Type" header) $widget.attr('download', xhr.getResponseHeader("Content-Type").replace('/', '.')); }