This question has been flagged
1 Reply
2404 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

Avatar
Discard
Best Answer

Takwa,

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  .,,,

Avatar
Discard