Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
12270 Widoki

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?


Awatar
Odrzuć
Najlepsza odpowiedź

Change your code to:

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

This will give you:


Awatar
Odrzuć

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

Powiązane posty Odpowiedzi Widoki Czynność
1
mar 21
2993
5
maj 25
7272
1
paź 24
22336
1
sie 21
3232
0
cze 21
6382