Skip to Content
मेन्यू
This question has been flagged
3962 Views

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
Discard

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

Author

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

Related Posts Replies Views Activity
1
मई 22
4467
0
नव॰ 21
21
0
नव॰ 21
3602
1
जून 21
2819
1
मार्च 21
4772