Odoo Help


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.


How to change upper left logo through module?

on 2/27/14, 6:40 PM 9,225 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?



| 5 2 8
Ahmadabad, India
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.

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?

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

0 follower(s)


Asked: 2/27/14, 6:40 PM
Seen: 9225 times
Last updated: 3/16/15, 8:10 AM