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

I have a question: Is it possible to embed an iframe in an Odoo 17 view with a dynamic URL passed from a model?

For example:

<iframe src="dynamic_url"></iframe>

I’ve tried using t-attr-src, but I encountered the error:

"Forbidden owl directive used in arch (t-foreach)."

Thank you.

อวตาร
ละทิ้ง

Hi
Yes, it's possible to embed an iframe with a dynamic URL in an Odoo 17 view. If t-attr-src or t-att-src  doesn't work then try  t-attf-src :

<iframe t-attf-src="dynamic_url"/>


Regards,

Jishna

Accurates

ผู้เขียน

I still got the same error,

here is my model

dynamic_url = fields.Char(string="Dynamic URL", default="https://google.com")

xml view

<iframe t-attf-src="dynamic_url"/>

ผู้เขียน คำตอบที่ดีที่สุด

I got an error while I was using t-att-src or t-attr-src

here is the error:

Forbidden owl directive used in arch (t-att-src).
อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มิ.ย. 24
2684
0
ส.ค. 25
7
3
ก.ค. 25
1943
1
มิ.ย. 25
2230
2
พ.ค. 25
1946