Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions web_favicon/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,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/162/9.0
:target: https://runbot.odoo-community.org/runbot/162/10.0

Known issues / Roadmap
======================
Expand All @@ -55,7 +55,7 @@ In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
`here <https://github.com/OCA/web/issues/new?body=module:%20
web_favicon%0Aversion:%20
9.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
10.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Credits
=======
Expand Down
4 changes: 2 additions & 2 deletions web_favicon/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

{
"name": "Custom shortcut icon",
"version": "9.0.1.0.0",
"version": "10.0.1.0.0",
"author": "Therp BV, "
"Tecnativa, "
"Odoo Community Association (OCA)",
Expand All @@ -19,5 +19,5 @@
"views/res_company.xml",
'views/templates.xml',
],
'installable': False,
'installable': True,
}
4 changes: 2 additions & 2 deletions web_favicon/controllers/web_favicon.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

import StringIO
import base64
from openerp import http
from openerp.tools.misc import file_open
from odoo import http
from odoo.tools.misc import file_open


class WebFavicon(http.Controller):
Expand Down
2 changes: 1 addition & 1 deletion web_favicon/models/res_company.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# © 2016 Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from openerp import models, fields
from odoo import models, fields


class ResCompany(models.Model):
Expand Down
8 changes: 4 additions & 4 deletions web_favicon/tests/test_web_favicon.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

import base64
from openerp.tests.common import TransactionCase
from openerp.tools.misc import file_open
from openerp import http
from odoo.tests.common import TransactionCase
from odoo.tools.misc import file_open
from odoo import http


class FakeRequest(object):
Expand All @@ -26,7 +26,7 @@ class TestWebFavicon(TransactionCase):
def test_web_favicon(self):
original_request = http.request
http.request = FakeRequest(self.env)
from openerp.addons.web_favicon.controllers.web_favicon import\
from odoo.addons.web_favicon.controllers.web_favicon import\
WebFavicon
company = self.env['res.company'].search([], limit=1)
# default icon
Expand Down
22 changes: 11 additions & 11 deletions web_favicon/views/res_company.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="view_company_form" model="ir.ui.view">
<field name="model">res.company</field>
<field name="inherit_id" ref="base.view_company_form" />
<field name="arch" type="xml">
<page name="configuration" position="inside">
<odoo>
<record id="view_company_form" model="ir.ui.view">
<field name="model">res.company</field>
<field name="inherit_id" ref="base.view_company_form" />
<field name="arch" type="xml">
<notebook position="inside">
<page string="Web Favicon" name="favicon">
<group string="Favicon" name="favicon">
<field name="favicon_backend" widget="image" />
<field name="favicon_backend_mimetype" attrs="{'required': [('favicon_backend', '!=', False)]}" />
</group>
</page>
</field>
</record>
</data>
</openerp>
</notebook>
</field>
</record>
</odoo>
16 changes: 7 additions & 9 deletions web_favicon/views/templates.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<template id="layout" inherit_id="web.layout">
<xpath expr="//link[@rel='shortcut icon']" position="replace">
<link rel="icon" href="/web_favicon/favicon" />
</xpath>
</template>
</data>
</openerp>
<odoo>
<template id="layout" inherit_id="web.layout">
<xpath expr="//link[@rel='shortcut icon']" position="replace">
<link rel="icon" href="/web_favicon/favicon" />
</xpath>
</template>
</odoo>