mirror of https://github.com/OCA/web.git
add preferences bug as known issue
parent
cb6d2c66ad
commit
d5c311b57c
|
@ -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>`_.
|
* 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
|
Bug Tracker
|
||||||
===========
|
===========
|
||||||
|
|
|
@ -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).
|
|
@ -16,7 +16,7 @@ openerp.web_widget_image_download = function (instance) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'HEAD',
|
type: 'HEAD',
|
||||||
url: this.imgSrc,
|
url: this.imgSrc,
|
||||||
complete(xhr) {
|
complete: function (xhr) {
|
||||||
// retrieve image type from server ("Content-Type" header)
|
// retrieve image type from server ("Content-Type" header)
|
||||||
$widget.attr('download', xhr.getResponseHeader("Content-Type").replace('/', '.'));
|
$widget.attr('download', xhr.getResponseHeader("Content-Type").replace('/', '.'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue