Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
5053 มุมมอง

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.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
มิ.ย. 21
14
Add Label up of form แก้ไขแล้ว
1
ธ.ค. 19
9224
2
เม.ย. 17
3350
1
มี.ค. 15
9514
Invisible atrribute synatx in odoo 17 แก้ไขแล้ว
3
ม.ค. 24
9975