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

In odoo, with a Python "raise warning" command I am able to launch a window that warns me of any error in a form. But until I fix that bug I can't save the form.

Now I want to create a simple confirmation window, that if I hit OK it will let me save the form.

Is there a command for this in Python?

Thank you very much.

Ảnh đại diện
Huỷ bỏ
Tác giả

is there a way to do this with python in an automatic action?

like: raise Warning("xxxx")

but instead of RAISE WARNING, another command?

Thanks!

Tác giả Câu trả lời hay nhất

is there a way to do this with python in an automatic action?

like: raise Warning("xxxx")

but instead of RAISE WARNING, another command?

Thanks!

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

two possible solutions:

1. using attribute "confirm" on view of button

2. create wizard to do as your needs

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

I added directly in the view of the model.

<button name="buttonClickEvent" string="Approve" type="object" class="oe_highlight"
confirm="Proceed to Approve Call?"/>


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 3 25
1375
4
thg 4 24
174279
0
thg 12 23
2172
5
thg 7 25
228050
1
thg 12 22
3285