Skip to Content
मेन्यू
This question has been flagged
1 Reply
2505 Views

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
Discard
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
Discard
Author

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 Views Activity
3
मार्च 25
2946
0
मार्च 25
1442
4
जन॰ 25
2418
2
अप्रैल 25
2880
0
फ़र॰ 25
1224