Odoo Help


Button to change/indicate the line state in a tree view

on 8/7/14, 10:21 AM 1,360 views

I have a tree view which the objects have a state, i created a button field inside de tree view that relate to a function to change the state from 'draft' to 'validated' but what i want now is to change the icon once the state is 'validated' How can i do this ?


odoo.ma by IBS Group

--odoo.ma by IBS Group--
| 4 6 8
Tétouan, Morocco
--odoo.ma by IBS Group--

For more informations about IBS, please visit our website at www.ibs-na.com.

For a specific questions, collaboration or help, please send us an email to support@ibs-na.com

odoo.ma by IBS Group
On 8/10/14, 1:41 PM

Put a condition on the invisible attribute of the button

Have 2 buttons, one visible when the state is draft and another visible when the state is validated.

Use the attrs attribute to achieve this.

Works.. but partially, since in a tree view you will have the icons aligned in two different columns

Daniel Blanco
on 5/6/17, 11:24 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: 8/7/14, 10:21 AM
Seen: 1360 times
Last updated: 3/16/15, 8:10 AM