跳至内容
菜单
此问题已终结
2 回复
6698 查看

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
3430
0
1月 23
2001
5
7月 25
2674
1
6月 25
1913