Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
6171 มุมมอง

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
พ.ย. 23
1512
1
ก.พ. 24
9602
¿how to create planned actions? แก้ไขแล้ว
2
มี.ค. 23
2508
0
มี.ค. 15
6005
1
ธ.ค. 22
6197