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

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มี.ค. 20
3692
0
เม.ย. 20
2424
2
ธ.ค. 19
2811
2
ธ.ค. 19
7539
3
มิ.ย. 19
9237