Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3967 Zobrazení

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
Zrušit

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

Autor

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

Related Posts Odpovědi Zobrazení Aktivita
1
kvě 22
4485
0
lis 21
21
0
lis 21
3613
1
čvn 21
2827
1
bře 21
4785