Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
2750 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Auteur

Thanks Waleed Ali Mohsen

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

Publications associées Réponses Vues Activité
3
mars 25
3379
0
mars 25
1646
4
janv. 25
2752
2
avr. 25
3296
0
févr. 25
1398