odoo 通知和刷新当前页面
this.actionService.doAction({ 'type': 'ir.actions.client', 'tag': 'reload', }); this.actionService.doAction({ type: 'ir.actions.client', tag: 'display_notification', params:{ 'title': "提醒", 'message': x, 'sticky': false, 'className':'bg-danger',}} );
python: def button_immediate_install(self): if self.module_id and self.module_state != 'installed': self.module_id.button_immediate_install() return { 'type': 'ir.actions.client', 'tag': 'reload', }
js
js:
window.parent.location.reload();