İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
6668 Görünümler

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
Vazgeç
Üretici

not working :/

En İyi Yanıt

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
Vazgeç
En İyi Yanıt

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
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
0
Ağu 22
40
2
May 22
3394
0
Oca 23
1991
5
Tem 25
2585
1
Haz 25
1864