Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
6473 Prikazi

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?

Avatar
Opusti
Avtor

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


Best Answer

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.

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
2
avg. 19
7096
2
maj 16
4262
4
jul. 24
15372
1
jul. 22
2660
0
jan. 22
2316