تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
6218 أدوات العرض

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
أغسطس 19
6962
2
مايو 16
4102
4
يوليو 24
15118
1
يوليو 22
2477
0
يناير 22
2131