Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
3971 Tampilan

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?

Avatar
Buang

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

Penulis

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

Post Terkait Replies Tampilan Aktivitas
1
Mei 22
4505
0
Nov 21
21
0
Nov 21
3621
1
Jun 21
2831
1
Mar 21
4789