Skip to Content
Menu
This question has been flagged
2 Replies
6787 Rodiniai

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}


Portretas
Atmesti
Autorius

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

Portretas
Atmesti
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

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
0
rugp. 22
40
2
geg. 22
3506
0
saus. 23
2078
1
rugs. 25
2015
5
liep. 25
2863