Odoo Help


How to change upper left logo through module?

on 2/27/14, 6:40 PM 13,560 views

Hi, I am trying to create a module that changes the upper left OpenERP logo, at the top of left menu.

I have a basic knowledge of how to create modules.

In /openerp/addons/web/static/src/xml/base.xml

<td class="oe_leftbar" valign="top">
   <t t-set="debug" t-value="__debug__ ? '&debug' : ''"/>
   <a class="oe_logo" t-attf-href="/?ts=#{Date.now()}#{debug}">
      <span class="oe_logo_edit">Edit Company data</span>
      <img t-att-src='widget.session.url("/web/binary/company_logo")'/>

img t-att-src='widget.session.url("/web/binary/company_logo") this line is confusing me, because of widget.session.url.

In my module should I extend it and simply give the path of my image or is there any other way of doing this?

Any suggestions?

On 2/28/14, 12:09 AM


You need to extend _get_logo method of /addons/base/res_company.py Line 268. You can just replace the name "res_company_logo.png" with your image after putting the image in res folder.

Hope this helps.


Don<t forget to clear the cache, you can test with inconito in chrome (I wasted alot of time because of that)

On 2/28/14, 4:47 PM

To inherit from /openerp/addons/project/project.py class.

I do this:

from openerp.osv import fields, osv
class test_module(osv.osv):
_inherit = "project.project"

// some code ...


But now I have to inherit from /openerp/addons/base/res/res_company.py

How can I inherit from res_company.py and override the desired function?

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

0 follower(s)


Asked: 2/27/14, 6:40 PM
Seen: 13560 times
Last updated: 7/30/17, 1:02 PM