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

Hi all,

It is great if we can make a conditional required or readonly from the python code !

in version 15 the possibility of making a field readonly based on a condition existed !

however on the current version it seem to be replaced ! 

it is possible to make it available or we should put an @api.contraints for every fields ? 

Best regards.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hello Nabil, 

In case of odoo v15 you can check the field_view_get method and based on that apply the conditions. 

For more reference : click here

Thanks,

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Hi,

thanks for your return.

we can only override write and create method to do manually the conditional required ! ;)



อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Required field depending on selection. แก้ไขแล้ว
1
ก.พ. 19
6048
1
มี.ค. 15
7159
1
มี.ค. 15
4329
0
ก.พ. 21
15
1
ต.ค. 23
7705