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

When I did this at v13:

raise Warning("You can't do that!")

it looked like this:



Now at v14, it looks like this:




How can I get a "user-friendly" message like at v13?


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

Change your code to:

raise UserError("You can't do that!") 

This will give you:


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

odoo.exceptions.Warning: An error occurred Please use the copy button to report the error to your support service

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مارس 21
2990
5
مايو 25
7243
1
أكتوبر 24
22319
1
أغسطس 21
3225
0
يونيو 21
6371