|
@ -28,10 +28,11 @@ class WebFavicon(http.Controller): |
|
|
@http.route('/web_favicon/favicon', type='http', auth="none") |
|
|
@http.route('/web_favicon/favicon', type='http', auth="none") |
|
|
def icon(self): |
|
|
def icon(self): |
|
|
request = http.request |
|
|
request = http.request |
|
|
company = request.env['res.company'].search([], limit=1) |
|
|
|
|
|
if 'uid' in request.env.context: |
|
|
if 'uid' in request.env.context: |
|
|
user = request.env['res.users'].browse(request.env.context['uid']) |
|
|
user = request.env['res.users'].browse(request.env.context['uid']) |
|
|
company = user.sudo(user.id).company_id |
|
|
company = user.sudo(user.id).company_id |
|
|
|
|
|
else: |
|
|
|
|
|
company = request.env['res.company'].search([], limit=1) |
|
|
favicon = company.favicon_backend |
|
|
favicon = company.favicon_backend |
|
|
favicon_mimetype = company.favicon_backend_mimetype |
|
|
favicon_mimetype = company.favicon_backend_mimetype |
|
|
if not favicon: |
|
|
if not favicon: |
|
|