Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
6236 Tampilan

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
Buang
Penulis

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


Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
2
Agu 19
6975
2
Mei 16
4109
4
Jul 24
15141
1
Jul 22
2485
0
Jan 22
2138