Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
4073 Weergaven

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
Annuleer

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

Auteur

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

Gerelateerde posts Antwoorden Weergaven Activiteit
1
mei 22
4666
0
nov. 21
21
0
nov. 21
3730
1
jun. 21
2919
1
mrt. 21
4885