Odoo Help


how to hide fields? when you select one of your fields.selection??

on 7/22/14, 11:25 PM 536 views

fields.selection: A and B

   A = fields1 will show and fields2 will automatically hide.

   B = fields2 will show and fields1 will automatically hide.

how will i going to do this... any help please!!




Jagdish Panchal
On 7/22/14, 11:48 PM


Try this

<field name="Selection_Field" />

<field name="A"  attrs="{'invisible': [('Selection_Field', '=', 'B')]}"/>

<field name="B"  attrs="{'invisible': [('Selection_Field', '=', 'A')]}"/>


hi sir, thanks for this info. but another problem occur how to hide the fields A and B.. the fields showed even if the user doesn't choose from the selection..

on 7/23/14, 3:43 AM
Med Said BARA
On 7/23/14, 12:35 AM

You can do it by adding a domain to your field and using widget selection in your xml.

Maybe, this question  https://www.odoo.com/forum/help-1/question/widget-selection-with-domain-fields-issue-12690 can help you.

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: 7/22/14, 11:25 PM
Seen: 536 times
Last updated: 3/16/15, 8:10 AM