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

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).
形象
丢弃
相关帖文 回复 查看 活动
1
6月 24
2668
0
8月 25
7
3
7月 25
1919
1
6月 25
2178
2
5月 25
1915