Odoo Help


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.


XML Validation Error when adding Class to Field

Michael Thomas
on 1/6/15, 10:52 AM 920 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">


<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?

Michael Thomas
On 1/6/15, 11:01 AM

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. 


Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

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

Question tools

1 follower(s)


Asked: 1/6/15, 10:52 AM
Seen: 920 times
Last updated: 3/16/15, 8:10 AM