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

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
2877
1
ม.ค. 16
6228
4
ม.ค. 16
6235
4
ก.ค. 20
8361
0
ธ.ค. 19
3732