Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
8526 Lượt xem

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!

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 9 22
2252
4
thg 5 18
11181
4
thg 1 18
3610
4
thg 12 23
17726
1
thg 9 16
7437