Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
2 Besvarelser
6868 Visninger

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
Kassér
Forfatter

not working :/

Bedste svar

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
Kassér
Bedste svar

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
Kassér
Related Posts Besvarelser Visninger Aktivitet
0
aug. 22
40
2
maj 22
3581
0
jan. 23
2141
1
sep. 25
2165
5
jul. 25
3064