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

Hii,

In a custom purchase workflow when submit, it should show a warning popup message that a product is expired (our custom field), and if user click on popup ok, workflow should continue as normal. 

By raise UserError stops the program execution until condition fixed. 

How to achieve in odoo 12 EE?

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

As @ Amr Abd-Alkrim Hassan replied. 
Achieved the requirement with the help of wizard.


Câu trả lời hay nhất

All Odoo errors will stop the execution of the python method if you raise them. So you can't do them through UserError, ValidationError. But there is a work around you can build a wizard that will get executed through an action and in the wizard you can build a form with buttons that are linked to python methods and you can execute what ever you want there.

Read more about how to build wizards here.
And For calling the wizard in your method read here.

Ả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 19
6639
2
thg 5 16
3818
4
thg 7 24
14615
1
thg 7 22
2064
0
thg 1 22
1888