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

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.

Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ม.ค. 22
48186
Open form in view mode? แก้ไขแล้ว
4
ธ.ค. 21
31947
1
ธ.ค. 21
7787
2
มี.ค. 15
8792
2
มี.ค. 15
5105