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.
Bu soru işaretlendi
1
Cevapla
3536
Görünümler
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.
Tartışma hoşunuza mı gidiyor? Sadece okumakla kalmayın, katılın!
Özel özelliklerden yararlanmak ve harika topluluğumuzla etkileşime geçmek için bugün bir hesap oluşturun!
Üye Ol| İlgili Gönderiler | Cevaplar | Görünümler | Aktivite | |
|---|---|---|---|---|
|
|
2
Oca 22
|
51893 | ||
|
Open form in view mode?
Çözüldü
|
|
4
Ara 21
|
35284 | |
|
|
1
Ara 21
|
9917 | ||
|
|
2
Mar 15
|
10692 | ||
|
|
2
Mar 15
|
7038 |