Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
2296 Visualizações

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
Cancelar
Melhor resposta

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
Cancelar
Autor

Thanks Waleed Ali Mohsen

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

Publicações relacionadas Respostas Visualizações Atividade
3
mar. 25
2690
0
mar. 25
1230
4
jan. 25
2231
2
abr. 25
2621
0
fev. 25
1083