This question has been flagged
1 Reply
4676 Views

I am trying to add a css class to a column in a tree view so I can adjust the columns and prevent page overflow. After doing some research, I determined that I needed to do one of the following:

<tree string="Products" class="myclass">

or

<field name="name" class="myclass">

Both of these are causing XML validation errors in the openerp console and, presumably, would do the same if I made a custom module. How can I set the class on a column in a tree view so that I can apply some custom css to it?

Avatar
Discard
Author Best Answer

Got it!. The cause for the validation errors was that I did not have a version attribute in my tree declaration, like so:

<tree string="Products" version="7.0" class="x-portal">

Now that I added the version, I am able to define a class. I have not yet tested if this correctly is assigning the css class and applying my style, but it does get past the XML validation error. 

 

Avatar
Discard