跳至內容
選單
此問題已被標幟
1 回覆
6232 瀏覽次數

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.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
8月 19
6971
2
5月 16
4108
4
7月 24
15135
1
7月 22
2482
0
1月 22
2137