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 is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
1
Reply
4902
Views
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