Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
6630 Vistas

Hello, I'm using odoo 15. 

I have a problem with notifications.

How to change the type to success?


warning = {
'type': 'notyfication',
'title': _("Warning for %s", p.name),
'message': 'Message...',
}
return {'warning': warning}


Avatar
Descartar
Autor

not working :/

Mejor respuesta

Hi, 

Try like this,

return {
'type': 'ir.actions.client',
'tag': 'display_notification',
'params': {
'type': 'success',
'message': "your success message",
'next': {'type': 'ir.actions.act_window_close'},
}
}

Thanks

Avatar
Descartar
Mejor respuesta

Hi,

Try raise the success notification using below code.

Use your required messages.

message = _("Your required notification message.")
return {
'type': 'ir.actions.client',
'tag': 'display_notification',
'params': {
'message': message,
'type': 'success',
'sticky': False,
}
}

Hope it helps

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
0
ago 22
40
2
may 22
3353
0
ene 23
1970
5
jul 25
2489
1
jun 25
1719