Odoo Help


How to set website favicon in Odoo 9?

Lena Razov
on 1/12/16, 6:58 PM 2,361 views

I want to override the website template to be able to use my own favicon on website in Odoo 9.

I have created a custom module website_favicon with the following structure:

__init__.py (empty)



    - website_templates.xml 


    -  src

        - img 


In  __openerp__.py I put {
    'name': "Website Favicon",
    'version': '1.0.0',
    'author': 'Me',
    'category': 'Custom',
    'description': '''Website Favicon''',
    'depends': ['website'],
    'data': [
    'installable': True

In website_templates.xml I put

<?xml version="1.0" encoding="utf-8"?>
  <template id="website_favicon" inherit_id="website.layout" name="Website Favicon">
         <xpath expr="//meta[@name='keywords']" position="after">
          <link rel="shortcut icon" href="/website_favicon/static/src/img/favicon.ico" type="image/x-icon"/>

The module installed successfully and I see the <link.../> code being inserted in the page source, but I don't see the new favicon on my website. Could you advice?

Ruban Kannan
On 2/25/16, 5:44 PM

normally I do position="replace". It's what I use for Odoo8 though. I'll try this in Odoo 9 and let you know. Below is the template.

<template id="site_layout_home" inherit_id="website.layout" name="Site Home layout" priority="17">

<xpath expr="//head//title" position="replace">

<title>My Title</title>


<xpath expr="//head//link" position="replace">

<link rel="shortcut icon" href="path/to/fav.ico" type="image/x-icon"/>



About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 1/12/16, 6:58 PM
Seen: 2361 times
Last updated: 2/25/16, 5:44 PM