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

Usually on Odoo, when you want to open a new url you new to use an action "ir.actions.act_url",

but so far I've only saw examples using the return statement. Like this:

return { 

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

    'url': 'https://sample.com/home',

    'target': 'self',

}
But the problema is that, later on, after opening this URL, I need to go back to Odoo. But this is not possible if the function is over, because of the return.

Is there a way to trigger this act_url action without using return?


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

I hope setting target as new will solve your problem, as the url will be opened in the new tab.

return { 

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

    'url': 'https://sample.com/home',

    'target': 'new',

}


Thanks

อวตาร
ละทิ้ง
ผู้เขียน

Hello Niyas, thanks for your answer!

But the problem is not related to the target, but with the return.

Is there a way to trigger an act_url action without using the return? opening a new url withou closing the python function that is. I hope I am being clear

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
พ.ย. 23
1540
3
ธ.ค. 19
7845
3
ก.ค. 19
14891
0
มี.ค. 18
365
2
ส.ค. 17
5622