コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
6780 ビュー

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
3504
0
1月 23
2074
1
9月 25
2009
5
7月 25
2855