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.

1

How to visible or invisible field in tree view based on condition?

By
Mohammed Khamis
on 3/7/15, 5:37 AM 1,198 views

I make some fields to save in it my data and make some other fields as boolean to make condition by it fields 

for example if f_bool1 is false i want to invisible f1 from tree view how can I make it .

thank you so much

0
FEDERICO LEONI
On 5/22/15, 1:43 PM

In your case on the tree view you need to add attributes to the field. Try with

<filed name="f1" attrs="{'invisible':[('f_bool1','=',false)]}"/> 

Should works.


In Tree view does it hide complete column when we use attrs="{'invisible':[('f_bool1', '=', false)]}", I found it only hides the data/content in that column. So I tried to using invisible="context.get('f_bool1') = false" instead of above one. It hides the complete column in Tree view. I hope it will help you.

Tintu Mon
on 4/11/16, 9:37 AM

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: 3/7/15, 5:37 AM
Seen: 1198 times
Last updated: 4/11/16, 9:39 AM