Odoo Help


Onchange action?

on 6/30/15, 4:28 AM 472 views

Hello everybody,

My case :

I have two fields :

1- Journal_id : m2o (account.journal) type selection(check or cash)

2- Num_check : a char field that i create

On a form view, I want when I set type=check, the Num_check will appears!!

My idea is to use onchange action on the field type, but I don't know how

A help please



| 4 4 5
Hyderabad, India

On 9/1/15, 4:33 AM


In you xml view for the field, you can simply set the invisible attribute for this field like:

<field name="your_Num_check_field_name" attrs="{'invisible': [('type', '!=', 'check')]}"

you cannot use onchange function for this functionality,... as it can only return the values or domains for the fields, can't modify the view.

hope it helps  .,,,

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: 6/30/15, 4:28 AM
Seen: 472 times
Last updated: 9/1/15, 4:33 AM