Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
5984 Переглядів

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

Аватар
Відмінити
Автор Найкраща відповідь

Hi,


I solved this with:

@api.one
Аватар
Відмінити
Найкраща відповідь

Put the name first before the string

 <button name="execute" string"Apply" type="object" class="oe_highlight"/>
Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
0
лют. 17
2816
1
січ. 16
6166
4
січ. 16
6165
4
лип. 20
8280
0
груд. 19
3670