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

I need to run additional commands after the Discard button has been pressed.

I know how to do this with "Save" button:

```
@api.model   
def create(self, vals): 
        # my code before create
        result = super(MODEL_NAME, self).create(vals)
        # my code after create
        return result
```

But I'm unable to find method associated with "Discard" button. How is it called?

อวตาร
ละทิ้ง

There is no python method behind the discard button. It's a web button to cancel/discard the changes.

ผู้เขียน

In that case how can I create my custom python method and run it after clicking the button?

Related Posts ตอบกลับ มุมมอง กิจกรรม
How to round sum of if code แก้ไขแล้ว
1
พ.ค. 22
4632
0
พ.ย. 21
21
0
พ.ย. 21
3703
1
มิ.ย. 21
2899
1
มี.ค. 21
4876