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.

3

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

By
TestUser
on 4/15/13, 8:21 AM 7,441 views

The Question has been closed

by
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.

4

Sudhir Arya (SA)

--Sudhir Arya (SA)--
10150
| 6 8 8
Ahmedabad, India
--Sudhir Arya (SA)--

Working as an OpenERP/Odoo developer and a Team Leader 

Top 5 Odoo contributor On Stackoverflow

LinkedIn

Blog

Stackoverflow

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': [
    'static/src/css/my.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?

TestUser
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 :-)

TestUser
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

kalmenchia
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

Prakash
on 10/10/13, 9:23 AM
1

ton123

--ton123--
1418
| 5 6 9
Lisse, Netherlands
--ton123--
End-User. Installed 6.1.1 on a DS412+, DS211+ and DS113J Synology NAS. Reference installation on Ubuntu 12.04/Samsung Notebook. 12-03-2013 In production for Suppliers and Customers, adresbook. 7 small companies. Testing accounting, document management, import and export. Too much showstoppers I haven't fixed at this moment. 06-05-2013 little progress. Migration to v7 impossible because of missing Dutch localisation modules. What I see working is nice, so further testing and asking. Start testing products and warehouse. Happy with this forum and the community.
ton123
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.

TestUser
on 4/15/13, 8:42 AM

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

ton123
on 4/15/13, 8:54 AM

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

TestUser
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.

ton123
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

Prakash
on 10/10/13, 9:22 AM

About This Community

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

Question tools

1 follower(s)

Stats

Asked: 4/15/13, 8:21 AM
Seen: 7441 times
Last updated: 3/16/15, 8:10 AM