Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

5

How to change Favicon?

By
DNTQ
on 12/4/13, 10:34 PM 13,232 views

How to change Favicon?

2

You have to override the web module with your own module. You can add a line like

'data': [ 'views/website_templates.xml' ]

in your __openerp__.py.

Put your favicon at static/src/img/favicon.ico and add a template to views/website_templates:

<template id="MYSITE_layout" inherit_id="website.layout" name="MYSITE layout" priority="17">
<xpath expr="//head//link" position="after">
<link rel="shortcut icon" href="/MYSITE_web/static/src/img/favicon.ico" type="image/x-icon"/>
</xpath>
</template>

1
Ivan Yelizariev
On 7/21/15, 10:22 AM

You can try my module web_debranding

It allows to configure favicon dynamically at Settings\System Parameters:

    <template id="web_debranding.web_layout" inherit_id="web.layout">
<xpath expr="//title" position="replace"></xpath>
<xpath expr="//link[@rel='shortcut icon']" position="replace">
<t t-set="favicon" t-value="request.env['ir.config_parameter'].get_param('web_debranding.favicon_url', '').strip()"/>
<t t-if="favicon">
<link rel="shortcut icon" t-att-href="favicon" type="image/x-icon"/>
</t>
</xpath>
</template>


1
Macopedia Sp. z o.o
On 8/25/14, 6:28 AM

In V8 you can change favicon by modifying templates. See e.g. "website.layout" view

Could you explain your solution with one more sentence please? I found website.layout, but no reference to the used favicon. just put the reference there?

Tobias Frankl
on 2/27/15, 2:14 AM
1
IT Libertas
On 3/24/16, 1:19 PM

You may do it through the interface with the help of this module: https://apps.odoo.com/apps/modules/8.0/colors_customization/

0
Sayed Aziz Ahmed
On 3/8/16, 4:41 AM

you can also replace the favicon.ico by just tracing it and replacing the ico file with your ico file.

i tried this step and it worked.

-2

Ray Carnes

--Ray Carnes--
15717
| 9 7 9
Greater Los Angeles, United States
--Ray Carnes--

Senior Odoo Analyst

OpenERP 6.1, 7.0 and Odoo 8.0, 9.0 (Since 2012)

Completed Functional and Technical Training.

Major Skills:

  • Needs Discovery and Requirements Analysis;

  • Function and Technical Specifications;

  • Project Planning;

  • Prototyping and Proof of concepts;

  • Data migration;

  • Configuration & Customization (UI and modules);

  • Integration - data, business logic and service levels;

  • Training and Knowledge transfer;

  • Go Live support;

  • Help desk;

  • Version Migration.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

Ray Carnes
On 12/4/13, 11:37 PM

Try changing the source code:

/addons/web/controllers/main.py#L548

image description

I don't like to change any default modules. Is it possible to override main.py somehow?

Kasper Souren
on 8/13/14, 7:44 AM

Try this: https://www.odoo.com/fr_FR/forum/help-1/question/how-to-remove-manage-databases-2615

RDTRONIC, RDTRONIC
on 10/1/14, 1:31 AM
-2

Thierry Godin

--Thierry Godin--
1516
| 8 7 8
Collegien, France
--Thierry Godin--

..

Thierry Godin
On 12/5/13, 4:25 PM

Or just drop yours here : addons/web/static/src/img

Regards

Thanks for you repky, but i don't want to change default module, i changed successfully using inherit JavaScript $('link[href="/web/static/src/img/favicon.ico"]').attr('href','/kderp_web/static/src/img/favicon.ico');     (function() {         var link = document.createElement('link');         link.type = 'image/x-icon';         link.rel = 'shortcut icon';         link.href = '/kderp_web/static/src/img/favicon.ico';         document.getElementsByTagName('head')[0].appendChild(link);     }());

DNTQ
on 12/5/13, 6:46 PM

Is it possible to somehow override stuff that's living in addons/web/static/src/img through a custom module?

Kasper Souren
on 8/13/14, 7:44 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

4 follower(s)

Stats

Asked: 12/4/13, 10:34 PM
Seen: 13232 times
Last updated: 9/8/16, 7:58 AM