콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
1475 화면

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
2672
0
8월 25
7
3
7월 25
1930
1
6월 25
2196
2
5월 25
1925