Odoo Help


How to center the header of a tree view

on 9/10/13, 6:59 AM 5,088 views


Could someone please tell me how to center the header of a tree view . I've tried to use a class css with the attribute text-align:center and noted it in the field (xml).

But this didn't work.

On 2/18/14, 10:15 AM


you can try to do so that was helpful for me

Using selector [data-id="my_field"]====> for a specific th tag and [data-field="my_field"] ====>for specefic td tag

Add the following code in your custom css file

   /*css properties */  

    /*css properties */

Thanks @ ZEeineb

Ankit H Gandhi(AHG)
on 10/25/15, 3:15 AM

Hiral Patel (hip)

--Hiral Patel (hip)--
| 2 1 5
--Hiral Patel (hip)--

Hiral Patel (hip)
On 9/16/13, 11:08 AM


In openerp-web -> addons -> web -> static -> src -> base.css you can find out following class :

.openerp th { font-weight: bold; vertical-align: middle; }

Modify this class by adding : text-align: center;

After modification refresh the browser, The header of tree view is aligned to 'center'.

Thank you for your answer.

on 9/16/13, 11:41 AM

The concern is that we apply a CSS style to the whole list so all the titles in this list will be centered or right where the same for all values ​​will be centered or right or left. Can we apply a style for a specefic tree or for specefic titles on the tree? Thank you.

on 9/16/13, 11:45 AM

@Hiral Patel, can we change the css alignment only for a particular tree?

Atchuthan - Technical Consultant, Sodexis Inc
on 9/17/13, 3:32 AM

It may be possible to apply for particular module by extend particular template, add class to <thead>, but not sure about this.

Hiral Patel (hip)
on 9/18/13, 4:46 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: 9/10/13, 6:59 AM
Seen: 5088 times
Last updated: 10/25/15, 3:14 AM