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

I use a button to update values on a table in odoo and I want to notify the user about the update. The update works fine when the notification is off. however, when I set the notification, although the update is performed, the screen does not refresh but the notification is displayed. Below is the code I use for the notification. Can someone help see how I can have the notification displayed and the screen to refresh?

return {
            'name': _('Information'),
            'type': 'ir.actions.client',
            'tag': 'display_notification',
            'params': {
                'type': 'info',
                'title': _('Information'),
                'message': 'All quantities are up to date',
                'fadeout': 'slow',
            },
        }


アバター
破棄
最善の回答
chain the display_notification with act_window_close, pls see below

return { 'name': _('Information'), 'type': 'ir.actions.client', 'tag': 'display_notification', 'params': { 'type': 'info', 'title': _('Information'), 'message': 'All quantities are up to date', 'fadeout': 'slow',
'next': {
'type': 'ir.actions.act_window_close',
} }, }


アバター
破棄
最善の回答

Hello 

check below link may help you

https://www.odoo.com/forum/help-1/how-to-reload-page-in-python-130677

アバター
破棄
関連投稿 返信 ビュー 活動
0
10月 23
43684
1
10月 23
5174
1
12月 22
4744
1
11月 22
2642
1
1月 22
2249