Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
6219 มุมมอง

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?

อวตาร
ละทิ้ง
ผู้เขียน

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


คำตอบที่ดีที่สุด

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.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ส.ค. 19
6962
2
พ.ค. 16
4102
how call odoo warning from javascript? แก้ไขแล้ว
4
ก.ค. 24
15118
1
ก.ค. 22
2477
0
ม.ค. 22
2131