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

I have a wizard in which I am returning pdf document report with 'ir.actions.act_url' for download popup. It works fine, but the problem is that the wizard window needs to be closed as well after it. I can do that via 'ir.actions.act_window_close', but I can't return two actions at once.

I've heard there is a way to do it with 'ir.action.server' with multi attribute, but I couldn't make it work. Is there any particular and simple example about how to use it for my problem?


close_action = {'type': 'ir.actions.act_window_close'}

dl_action = {

    'type': 'ir.actions.act_url',

    'url': '/documents/download?document_id={}'.format(document.id),
    'target': 'self'

}

return dl_action

形象
丢弃
编写者 最佳答案

Hey, it doesn't work with 'new' either, but thanks for replying Nikul.

形象
丢弃
最佳答案

Hello Mr.Peter Markus

Please change target parameter "new", I think it's helpful for you.
return {
            'type': 'ir.actions.act_url',
            'url': '/documents/download?document_id={}'.format(document.id),
            'target': 'new',
        }

形象
丢弃
相关帖文 回复 查看 活动
0
11月 23
1515
1
2月 24
9608
2
3月 23
2520
0
3月 15
6022
1
12月 22
6207