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

Hi, I use the module web_one2many_selectable_10, now I want to know if is it possible to implement onchange method to the checkbox in every row on my one2many field?

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

Hi peter,
Yes,it is possible to implement onchange method to the checkbox in every row on a one2many field.
Use the following code:

@api.onchange('field_name')
def onchange_field_name(self):
# get the required data in record
for line in record:
line.check_box_field_name = True

Regards

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 9 20
2910
0
thg 4 16
3221
3
thg 3 16
14029
1
thg 3 15
12442
1
thg 4 23
5189