Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2404 Lượt xem

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





Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Tác giả

Thanks Waleed Ali Mohsen

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

Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 3 25
2773
0
thg 3 25
1322
4
thg 1 25
2309
2
thg 4 25
2729
0
thg 2 25
1173