Odoo Help


Show the name of database I'm currently logged in [Closed]

on 4/15/13, 8:21 AM 9,341 views

The Question has been closed

Sudhir Arya (SA)
on 04/18/2013 04:54:42

I have several databases. Is it possible to show the name of the database in openerp system in which I'm currently logged in?

I mean... like creating some sort of a label and add it to the module bar or so.

Sudhir Arya (SA)
On 4/15/13, 8:41 AM

You can find database name in url like this: http://localhost:8069/?db=test_7

You can try this one also:

Start your db in degub mode. Go to Right top corner -> About OpenERP -> (click on ) Activate the developer mode.

Then you can see database name in which you are currently logged in.

image description

In image/url you can see test_7 is a database name.

If you want to enlarge the area, you have to change max-width value of .openerp .oe_topbar .oe_topbar_name class which is inside base.css file. For that you have to overwrite that class.

So create one css file inside your_module/static/src/css folder and add following code:

@charset "utf-8";
.openerp .oe_topbar .oe_topbar_name {
 max-width: 190px;
 overflow: hidden;
 display: inline-block;
 max-height: 100%;
 text-overflow: ellipsis;
 white-space: nowrap;

Go to __openerp__.py and add your css file under css like this:

'css': [

Now, restart your server and refresh the page.

Here, max-width: 150px; is given in base.css and now we are changing it's value to enlarge the area as per our need. I changed it by 190px. You can change it to any value which is suitable to you.

Here "Enlarge Area" you can see complete answer.

This is really helpful thank you. However it doesn't show the entire db name just the first letters and I can't see the ) Is it possible to enlarge the area for the db name?

on 4/15/13, 8:46 AM

See my updated answer to enlarge the area.

Sudhir Arya (SA)
on 4/15/13, 9:43 AM

Wow thanks! That's the ultimate answer :-)

on 4/15/13, 9:46 AM

I have made a module for this features , u can take a look and see whether it is useful https://bitbucket.org/kalmenchia/openerp-egl-addons/src

Kalmen Chia / E-Global SCM Solutions Sdn Bhd
on 7/11/13, 4:11 AM

I also know how to show Database Name shows in all the time user login [I increased max-width:190px; but still not shows DB Name

on 10/10/13, 9:23 AM
On 4/15/13, 8:40 AM

I think you looked over it ...

In v6.1. direct right from the OpenERP logo you see the name of the company.

Between () you see the complete name of the database.

And below that you see your login name.

The way you described it I remember from Version 6.1 but not in my Version 7. Above the OpenERP logo I see the module bar at the right end of this bar I see my login name. But there is no database name.

on 4/15/13, 8:42 AM

You didn't say you used version v7. Yes I described how it is in v6.1.

on 4/15/13, 8:54 AM

Yes, I apologize. I forgot about it but I added now a tag.

on 4/15/13, 9:00 AM

@Hartmut If my answer is the answer on your question I appreciate if you marked it as answered. If you find my answer is useful and interesting for others you can best vote it up.

on 4/22/13, 7:17 AM

Dears, we need to find solution for V7.0

tamer maged
on 5/1/13, 10:51 AM

I also know how to show Database Name shows in all the time user login [I increased max-width:190px; but still not shows DB Name

on 10/10/13, 9:22 AM

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: 4/15/13, 8:21 AM
Seen: 9341 times
Last updated: 3/16/15, 8:10 AM