Skip to Content
Menú
This question has been flagged
2 Respostes
6624 Vistes

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 :/

Best Answer

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
Best Answer

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
Related Posts Respostes Vistes Activitat
0
d’ag. 22
40
2
de maig 22
3350
0
de gen. 23
1969
5
de jul. 25
2479
1
de juny 25
1710