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

I have a use case where I need to display a video(youtube/vimeo) based on a field which is updated by the portal user. 

I could able to get the url field from the portal and display it in the form view for the internal user(admin) but not able to render the video inside the form.  

Reason: dynamic templating using t-if, t-att, t-src, etc., which is common in QWeb templates, is not allowed in standard XML form views for odoo 17. 

Can anyone guide me in embedding a youtube video to a form view. 

아바타
취소
베스트 답변

Hi,

Try adding a new html field in your model and there is option to embed video and auto play it.

아바타
취소
작성자

I want to update the video dynamically based on my field value. This one is static.

Then try adding url in a new field and get values to html field from there

작성자

I did follow your steps on using python: https://imgur.com/carbon-Xs2iteV

I renders just a empty field not rendering the video.

관련 게시물 답글 화면 활동
2
1월 22
48383
4
12월 21
32131
1
12월 21
7863
2
3월 15
8933
2
3월 15
5251