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

Hi,


i'm trying to call a function in python with following buttons:

<form string="Settings" class="oe_form_configuration">
     <header>
         <button string="Apply" type="object" name="execute" class="oe_highlight"/>
         <button string="Cancel" type="object" name="cancel" class="oe_link"/>
    </header>
     ...
</form>

But, they will never be called. After some time, I saw that is just called the method of update, that is, def write(...).

Can someone help me understand the problem?


Best regards

Awatar
Odrzuć
Autor Najlepsza odpowiedź

Hi,


I solved this with:

@api.one
Awatar
Odrzuć
Najlepsza odpowiedź

Put the name first before the string

 <button name="execute" string"Apply" type="object" class="oe_highlight"/>
Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
lut 17
2758
1
sty 16
6100
4
sty 16
6099
4
lip 20
8205
0
gru 19
3626