Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
5418 Näkymät

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
Hylkää
Paras vastaus
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
Hylkää
Paras vastaus

Hello 

check below link may help you

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

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
0
lokak. 23
43386
1
lokak. 23
4989
1
jouluk. 22
4596
1
marrask. 22
2516
1
tammik. 22
2152