Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
2362 มุมมอง

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





อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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.

อวตาร
ละทิ้ง
ผู้เขียน

Thanks Waleed Ali Mohsen

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

Related Posts ตอบกลับ มุมมอง กิจกรรม
3
มี.ค. 25
2737
0
มี.ค. 25
1279
4
ม.ค. 25
2267
2
เม.ย. 25
2686
0
ก.พ. 25
1154