تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1705 أدوات العرض

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

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مارس 20
3601
0
أبريل 20
2311
2
ديسمبر 19
2703
2
ديسمبر 19
7374
3
يونيو 19
9061