Browse Source

add preferences bug as known issue

pull/391/head
kutyel 8 years ago
parent
commit
d5c311b57c
  1. 1
      web_widget_image_download/README.rst
  2. 3
      web_widget_image_download/__init__.py
  3. 2
      web_widget_image_download/static/src/js/web_widget_image_download.js

1
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 <https://github.com/odoo/odoo/pull/12918>`_.
* For some unknown reason, the widget does not work in the `Preferences` view, because odoo is not rendering the **QWeb** template.
Bug Tracker
===========

3
web_widget_image_download/__init__.py

@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2016 Flavio Corpa <flavio.corpa@tecnativa.com>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

2
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('/', '.'));
}

Loading…
Cancel
Save