コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
2010 ビュー

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
2223
0
3月 25
982
4
1月 25
1959
2
4月 25
2276
0
2月 25
831