Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odgovori
5332 Prikazi

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',
            },
        }


Avatar
Opusti
Best Answer
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',
} }, }


Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
0
okt. 23
43242
1
okt. 23
4912
1
dec. 22
4537
1
nov. 22
2477
1
jan. 22
2119