コンテンツへスキップ
メニュー
この質問にフラグが付けられました
4003 ビュー

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?

関連投稿 返信 ビュー 活動
1
5月 22
4531
0
11月 21
21
0
11月 21
3644
1
6月 21
2849
1
3月 21
4820