Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odgovori
6685 Prikazi

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
Opusti
Avtor

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
Opusti
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
Opusti
Related Posts Odgovori Prikazi Aktivnost
0
avg. 22
40
2
maj 22
3422
0
jan. 23
1998
5
jul. 25
2622
1
jun. 25
1886