Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2207 Widoki

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
mar 20
4366
0
kwi 20
2811
2
gru 19
3267
2
gru 19
8131
3
cze 19
9879