Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
2164 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Penulis

Thanks Waleed Ali Mohsen

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

Post Terkait Replies Tampilan Aktivitas
3
Mar 25
2435
0
Mar 25
1119
4
Jan 25
2101
2
Apr 25
2490
0
Feb 25
966