Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
4008 Lượt xem

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?

Ảnh đại diện
Huỷ bỏ

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

Tác giả

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

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 5 22
4575
0
thg 11 21
21
0
thg 11 21
3684
1
thg 6 21
2860
1
thg 3 21
4824