Odoo Help


how to set or case in attrs?

willie ho
on 4/16/15, 12:41 AM 398 views

I am editing the UI of ODOO and I want to set a button invisible when the state is not draft or another field is blank

how do I do this?

On 4/16/15, 2:16 AM


you can use attrs to the button in xml to make it invisible based on condition.

Here is the example

attrs="{'invisible':['|',('state','not in',('draft')),('another_field','=',False)]}


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 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: 4/16/15, 12:41 AM
Seen: 398 times
Last updated: 4/16/15, 2:16 AM