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

While create the UserError message, unable to more the string to new line,

Facing in version  odoo 17.


Example:

raise UserError(_( "Warning ! \n\n Qty must be grather than zero."))





Awatar
Odrzuć
Najlepsza odpowiedź

Hi,

\n is working as you can see below:

def raise_error(self):
raise UserError(_("Warning!\n\nQty must be greater than zero."))


You need to restart the Odoo service and upgrade your Module.

Awatar
Odrzuć
Autor

Thanks Waleed Ali Mohsen

I tried but i didn't see any changes on this, I am facing this in 17.0

Powiązane posty Odpowiedzi Widoki Czynność
3
mar 25
2782
0
mar 25
1326
4
sty 25
2312
2
kwi 25
2740
0
lut 25
1176