Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
6653 Widoki

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}


Awatar
Odrzuć
Autor

not working :/

Najlepsza odpowiedź

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

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
sie 22
40
2
maj 22
3385
0
sty 23
1980
5
lip 25
2566
1
cze 25
1809