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

I created a JavaScript file in CRM that displays a confirmation screen when the "Discard Changes" button at the top is pressed. Pressing "Confirm" works fine, but pressing "Cancel" does not restore the values that have already been entered or changed. How can I handle this part in Odoo 17 Community Edition?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello Kairoq

You can call the discard function when the user press cancel

this.model.root.discard();

You can use this module for refrence

https://apps.odoo.com/apps/modules/17.0/auto_save_restrict

If this helps please upvote my answer and mark it correct

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 8 25
157
2
thg 5 25
1346
1
thg 4 25
1271
0
thg 3 25
1385
0
thg 3 25
1303