Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
2403 Näkymät

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





Avatar
Hylkää
Paras vastaus

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.

Avatar
Hylkää
Tekijä

Thanks Waleed Ali Mohsen

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

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
3
maalisk. 25
2773
0
maalisk. 25
1322
4
tammik. 25
2309
2
huhtik. 25
2729
0
helmik. 25
1173