mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[11.0][MIG] Standard Migration
This commit is contained in:
committed by
Pedro M. Baeza
parent
a02a7008ee
commit
919a24f5d0
@@ -1,8 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2015 Therp BV <http://therp.nl>
|
||||
# Copyright 2015 Therp BV <http://therp.nl>
|
||||
# Copyright 2017 QubiQ 2010 <http://www.qubiq.es>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
import StringIO
|
||||
from io import BytesIO
|
||||
import base64
|
||||
from odoo import http
|
||||
from odoo.tools.misc import file_open
|
||||
@@ -21,9 +22,9 @@ class WebFavicon(http.Controller):
|
||||
favicon = company.favicon_backend
|
||||
favicon_mimetype = company.favicon_backend_mimetype
|
||||
if not favicon:
|
||||
favicon = file_open('web/static/src/img/favicon.ico')
|
||||
favicon = file_open('web/static/src/img/favicon.ico', 'rb')
|
||||
favicon_mimetype = 'image/x-icon'
|
||||
else:
|
||||
favicon = StringIO.StringIO(base64.b64decode(favicon))
|
||||
favicon = BytesIO(base64.b64decode(favicon))
|
||||
return request.make_response(
|
||||
favicon.read(), [('Content-Type', favicon_mimetype)])
|
||||
|
||||
Reference in New Issue
Block a user