跳至內容
選單
此問題已被標幟
2 回覆
12258 瀏覽次數

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
3月 21
2992
5
5月 25
7258
1
10月 24
22330
1
8月 21
3230
0
6月 21
6373