mirror of https://github.com/OCA/web.git
[MIG] web_favicon: Migrated to 10.0 (#459)
parent
78f2d47bed
commit
f0fbe02c48
|
@ -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
|
||||
======================
|
||||
|
@ -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
|
||||
=======
|
||||
|
|
|
@ -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)",
|
|
@ -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):
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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):
|
||||
|
@ -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
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<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">
|
||||
<page name="configuration" position="inside">
|
||||
<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>
|
||||
</notebook>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
</odoo>
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<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>
|
||||
</data>
|
||||
</openerp>
|
||||
</odoo>
|
||||
|
|
Loading…
Reference in New Issue