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