跳至內容
選單
此問題已被標幟
2 回覆
6800 瀏覽次數

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}


頭像
捨棄
作者

not working :/

最佳答案

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

頭像
捨棄
最佳答案

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

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
8月 22
40
2
5月 22
3512
0
1月 23
2086
1
9月 25
2027
5
7月 25
2880