mirror of https://github.com/OCA/web.git
[IMP] review points
parent
560b6c9472
commit
6a21060cc5
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue