Skip to Content
Menú
This question has been flagged
1 Respondre
2504 Vistes

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
Descartar
Best Answer

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
Descartar
Autor

Thanks Waleed Ali Mohsen

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

Related Posts Respostes Vistes Activitat
3
de març 25
2944
0
de març 25
1440
4
de gen. 25
2417
2
d’abr. 25
2877
0
de febr. 25
1224