跳至内容
菜单
此问题已终结
2 回复
6933 查看

I have the following wizard function that returns a notification to the client after do something:

def wizard_do_something(self):
 # do something
return {
'type': 'ir.actions.client',
'tag': 'display_notification',
'params': {
'title': 'Carga de archivos',
'message': client_message,
'sticky': True,
'target': 'current',
}


If the return is a notification, the modal won't close. It is possible to show the notification and then close the wizard modal?

形象
丢弃
最佳答案

hi, 

I find the solution using:

'next': {'type': 'ir.actions.act_window_close'},

for ex:

action= {
'type': 'ir.actions.client',
'tag': 'display_notification',
'params': {
'title': 'Title',
'message': "message",
'sticky': True, #True/False will display for few seconds if false
'next': {'type': 'ir.actions.act_window_close'},
}
}
return action

hope that could help you,

regards,

形象
丢弃
最佳答案

Hi Ian Riva B,

It is not possible to show the notification and then close the wizard modal? In odoo but I have suggestions for that if you can be changed to 'sticky': True to False, so that You can show a notification for few seconds.


How to show a notification and then close a wizard?
https://www.odoo.com

Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

形象
丢弃
相关帖文 回复 查看 活动
0
3月 15
4640
0
10月 24
1299
2
9月 23
2539
1
12月 22
3341
3
6月 22
6960