mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[IMP] review points
This commit is contained in:
@@ -25,9 +25,7 @@ Usage
|
||||
|
||||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
||||
:alt: Try me on Runbot
|
||||
:target: https://runbot.odoo-community.org/runbot/{repo_id}/8.0
|
||||
|
||||
.. repo_id is available in https://github.com/OCA/maintainer-tools/blob/master/tools/repos_with_ids.txt
|
||||
:target: https://runbot.odoo-community.org/runbot/162/8.0
|
||||
|
||||
For further information, please visit:
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -37,8 +37,6 @@ class FakeResponse(object):
|
||||
self.headers = dict(headers)
|
||||
|
||||
|
||||
|
||||
|
||||
class TestWebFavicon(TransactionCase):
|
||||
def test_web_favicon(self):
|
||||
original_request = http.request
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<data>
|
||||
<template id="layout" inherit_id="web.layout">
|
||||
<xpath expr="//link[@rel='shortcut icon']" position="replace">
|
||||
<link rel="shortcut icon" href="/web_favicon/favicon" />
|
||||
<link rel="icon" href="/web_favicon/favicon" />
|
||||
</xpath>
|
||||
</template>
|
||||
</data>
|
||||
|
||||
Reference in New Issue
Block a user