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

Hey everyone, 

I have this One2many field displayed as a tree view, and I want to prevent creation and deletion of rows conditionally, but also leave the existing rows editable, so 'readonly' wont work for me.

I tried attrs="{'create': [('order_type', '!=', 'renewal)]}" same for delete, but it did not work, 

is it possible to do that form xml, without having to write some JS code ? 

thank you in advance!

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

found the solution on stackoverflow
\https://stackoverflow.com/questions/63071176/prevent-create-and-delete-on-a-one2many-tree-view/63075724#63075724

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ก.ย. 22
2184
4
พ.ค. 18
11105
4
ม.ค. 18
3477
4
ธ.ค. 23
17676
1
ก.ย. 16
7395