Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
6218 Widoki

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

Awatar
Odrzuć
Autor Najlepsza odpowiedź

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

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
lis 23
1524
1
lut 24
9609
2
mar 23
2525
0
mar 15
6029
1
gru 22
6225