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

how to set or case in attrs?

By
willie ho
on 4/16/15, 12:41 AM 334 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?

1
Sea
On 4/16/15, 2:16 AM

Hi,

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)]}


Thanks.

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)

Stats

Asked: 4/16/15, 12:41 AM
Seen: 334 times
Last updated: 4/16/15, 2:16 AM