跳至內容
選單
此問題已被標幟
1 回覆
1983 瀏覽次數

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

相關帖文 回覆 瀏覽次數 活動
3
3月 25
2189
0
3月 25
965
4
1月 25
1946
2
4月 25
2258
0
2月 25
804