Odoo Help


Right align labels in tree view (V7) for some fields(numeric fields)

Kevin McMenamin
on 5/29/13, 5:43 PM 6,842 views

Is there a way to set labels for numeric fields to be right aligned?

Hello Kevin , you get any solution ? I want that all labels of tree-view will be right aligned too. Thanks to answer

on 9/2/13, 8:03 AM



| 5 5 7
Bikaner, India

OpenERP Developer at SunARC Technology

On 1/16/14, 5:32 AM

In custom module create your CSS file, and put it in the standard place : module/static/src/css/allign.css and then add to the list of css files to load in __openerp__.py : css:['static/src/css/allign.css']

The below code for right align data in tree view:-

In allign.css add the below line:-

.openerp .rallign {
  text-align: right;

In xml file add the below line:-

<tree string="Product" version="7.0">
    <field name="total" class="rallign"/>

For right align labels the default base css base/static/src/css/allign.css Line:2928

.openerp .oe_list_content th.oe_sortable, .openerp .oe_list_content th.oe_sortable div {
    cursor: pointer;
    text-align: right; /* added this line */

The above right align Label all the modules. No idea about particular field Label in tree view.

I tried this, but it isn't working for me. I confirmed the "rallign" css class is loaded, but it doesn't get applied to the header nor field in the generated HTML.

Daniel Reis
on 3/12/14, 1:12 PM

Please make sure tree view included version="7.0" then only its works. please apply the changes using plugin --> inspect Element with Firebug and then add the above code in custom module

on 3/13/14, 2:07 AM
Voathnak Lim
On 7/9/13, 7:13 AM

you could add class on it in the xml view. and add the css in static.

please give an example

Omal Bastin
on 11/4/13, 10:25 AM

I am not able to use class attribute in tree view.

on 1/9/14, 2:18 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: 5/29/13, 5:43 PM
Seen: 6842 times
Last updated: 3/16/15, 8:10 AM