تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
2291 أدوات العرض

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
مارس 25
2672
0
مارس 25
1223
4
يناير 25
2218
2
أبريل 25
2607
0
فبراير 25
1078