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

I have a button which calls a function which then will open a wizard, now I am trying to implement a server action which will call the exact same method but it doesnt open the wizard. I want to display a wizard with error message if the server action code fail

الصورة الرمزية
إهمال
أفضل إجابة

Hello Trong,

Find code in Comment. 

I hope this will help you.

Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

الصورة الرمزية
إهمال

Try to below code for the open wizard,
return {
"type": "ir.actions.act_window",
"res_model": "Model name",
"views": “form”,
"name": "Wizard name",
}
If you want to display an error message used to UserError as per your requirement
example: raise UserError(_('Your message.'))

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
يونيو 25
1690
3
يوليو 25
3318
1
مايو 25
1456
1
مايو 25
1722
4
مايو 25
2863