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

Hi all,

I want to hide the page of "Measurement Setting" when the field "test_type_id != 5". this setting works. If "test_type_id ==5" I want the user to enter values in "measure_data_ids" (o2m field). 

The problem is that "required ="test_type_id ==5" does not do the job. User can save the record with an empty "measure_data_id". Please correct me.     

     

   


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

you can add a constraint to check if the o2m is empty. So that if test_type_id==5 and length of o2m is 0, you can raise an error to stop the record in saving.

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

Hi K Ch Kumar,

Thank you very much. your suggestion works. 

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
มิ.ย. 24
1302
1
พ.ค. 24
1448
0
ก.ย. 19
15442
0
ก.ค. 25
491
2
ก.ค. 25
35