Skip to Content
Menu
This question has been flagged
1 Atsakyti
2422 Rodiniai

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





Portretas
Atmesti
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.

Portretas
Atmesti
Autorius

Thanks Waleed Ali Mohsen

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

Related Posts Replies Rodiniai Veikla
3
kov. 25
2807
0
kov. 25
1337
4
saus. 25
2325
2
bal. 25
2762
0
vas. 25
1183