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 invisible field in tree view by check box?

By
Mohammed Khamis
on 3/7/15, 9:05 AM 1,267 views

I try to invisible some field by clicking check box but I don't know how can I make it .

please help me.

thank you so much

2

zbik

--zbik--
5941
| 6 4 7
Lodz, Poland
--zbik--


zbik
On 3/8/15, 4:02 PM

Yes, it is possible. Try this (in xml):

<field name="my_checkbox"/>
<field name="my_foo1" attrs="{'invisible':[('my_checkbox','=',False)]}"/>
<field name="my_foo2" attrs="{'invisible':[('my_checkbox','!=',False)]}"/>

or like this:

<field name="my_foo3" invisible="context.get('my_checkbox',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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 3/7/15, 9:05 AM
Seen: 1267 times
Last updated: 4/11/16, 9:48 AM