跳至内容
菜单
此问题已终结

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.

形象
丢弃
相关帖文 回复 查看 活动
0
6月 21
14
1
12月 19
9222
2
4月 17
3349
1
3月 15
9512
3
1月 24
9955