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.

11

How to enlarge database name area [Closed]

By
Sudhir Arya (SA)
on 4/15/13, 9:53 AM 4,484 views

The Question has been closed

by
Sudhir Arya (SA)
on 04/23/2013 04:12:30

If a user is using OpenERP in debug mode and can see database name (practice...) as shown in image. image description

Now, user wants to enlarge the area, so that he can see full name of the database.

How can I achieve this?

14

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, 9:54 AM

You can enlarge the area by changing 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; was given in base.css and now we are changing it's value as per our need. I changed it by 190px. You can change it to any value which is suitable to you.

You can see enlarge area and whole database name in image: image description

How to see the db name at the same position when not in debug mode?

Shelton
on 5/6/13, 9:37 AM

If you really want to do so then there is a way to see db name. Go to "web/addons/web/static/src/js/chrome.js" line 1108 and remove if(instance.session.debug) from do_update method. After this you can see db name without debug mode also.

Sudhir Arya (SA)
on 5/6/13, 9:45 AM

Sorry I don't know how to override js method. So you have to make changes in source code.

Sudhir Arya (SA)
on 5/6/13, 10:26 AM

Thanks Sudhir Arya..I will try that..

Shelton
on 5/6/13, 10:35 AM

Hello sudhir, i followed the steps max-width: 190px; but still DB Name not shown. DB name shows only in the Debug mode. Is there any way DB name to show all the time? Thanks

Prakash
on 10/14/13, 5:44 AM

Yes Prakash, There is a way to show DB name without debug mode. Follow this: How to shwo DB name without debug mode.

Sudhir Arya (SA)
on 10/19/13, 2:38 PM

Thanks Sudhir Arya solved

Prakash
on 10/22/13, 3:07 AM

Nice its working...... tx sudhir arya

Odoo
on 6/30/14, 7:08 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, 9:53 AM
Seen: 4484 times
Last updated: 4/4/16, 1:43 PM