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.

0

Modify colors in tree view (v7) using view inheritance? [Closed]

By
Laurent33
on 5/16/13, 12:45 PM 4,698 views

The Question has been closed

by
Ray Carnes
on 05/16/2013 19:29:56

Hello,

I want to modify colors depending on status in account.invoice.tree view in my custom module.

How can I make that in an inherit view?

Regards,

Laurent

3

Francesco OpenCode

--Francesco OpenCode--
3608
| 5 7 9
Grottaglie, Italy
--Francesco OpenCode--

Italian Odoo (OpenERP) Modules Developer LINKEDIN: http://www.linkedin.com/in/francescoapruzzese

Francesco OpenCode
On 5/16/13, 1:00 PM

The color can be changed with this code

<tree colors="red:state='draft'">

in a inherith view you can change the color using attributes

<tree position="attributes">
    <attribute name="colors">red:state='draft'</attribute>
</tree>

Thank you Francesco, just to be correct <attribute name="colors">red:state='draft'</attribute>

Laurent33
on 5/16/13, 1:45 PM

Answer update too...;)

Francesco OpenCode
on 5/16/13, 2:24 PM

Just to be sure should it not be: ... red:state=='draft' ... ?

Peter Nietz
on 3/20/14, 9:47 AM

Yes, it should be like colors="red:state == 'cancel'"

John
on 5/15/16, 8:58 PM

About This Community

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

Question tools

1 follower(s)

Stats

Asked: 5/16/13, 12:45 PM
Seen: 4698 times
Last updated: 3/16/15, 8:10 AM