Skip to Content
Menu
This question has been flagged

Hello, I'm using Odoo 13.


I have a form view with some fields I want to hide based on a condition:


Because showing codes does not work at the moment:

https://www.codepile.net/pile/zvDQYYoJ


"custom_field1" is a Many2one field, all the other fields are Float fields.



All fields have to be in one row and I have to use div.



So the invisible contitions works perfekt, but they left huge blank spaces, where the invisible fields are. For example, if I choose the id "(%(custom_model.custom_id_6)d)" on the field "custom_field1", the fields "custom_field3", "custom_field4", "custom_field5" get invisible, but the space is still used from them.

I thougth if I use the invisible attributes, the field gets "replaced" but thats not the case.



I already thought I could add the attribute "style="display: none;" to the fields based on the condition, but I dont know how to trigger that in a form view.

Avatar
Discard
Related Posts Replies Views Activity
0
Jun 21
14
1
Dec 19
7901
2
Apr 17
2411
1
Mar 15
8325
3
Jan 24
4798