Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
1 Svar
2357 Visninger

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."))





Avatar
Kassér
Bedste svar

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.

Avatar
Kassér
Forfatter

Thanks Waleed Ali Mohsen

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

Related Posts Besvarelser Visninger Aktivitet
3
mar. 25
2732
0
mar. 25
1278
4
jan. 25
2263
2
apr. 25
2685
0
feb. 25
1154