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

I have two methods :


@api.onchange("field_A")

def method1(self):

    self.field_B += 1


@api.onchange("field_B")

def method2(self):

    self.field_A += 1


This causes a loop : modifying field A modifies field B that modifies field A. It is not an infinite loop, but it's not the result I expected. Is there a way to fix this ?


Thank you

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 3 20
4373
0
thg 4 20
2817
2
thg 12 19
3271
2
thg 12 19
8135
3
thg 6 19
9888