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

Python code:

def openVideo(self):
video_url = self._context.get('url') # yes, this have a value
return {
'type': 'ir.actions.act_window',
'name': 'Video',
'res_model': 'ir.ui.view',
'view_mode': 'form',
'context': {
**self._context,
'default_video_url': video_url
},
'view_id': self.env.ref('tms_manual_sistema.video_popup').id,
'target': 'new',

}

Template:

<odoo>
<data>
<template id="tms_manual_sistema.video_popup">
<div>
<t t-if="context.get('default_video_url')">
<p>Video URL: <t t-esc="context.get('default_video_url')"/></p>
</t>
<t t-else="">
<p>No video URL provided</p>
</t>
</div>
<div class="o_notification o_notification_warning">
<div class="oe_video">
<iframe width="560" height="315" t-att-src="context.get('default_video_url')" frameborder="0" allowfullscreen="true"/>
</div>
</div>
</template>
</data>
</odoo>

Always shows "No Video URL provided". What i did wrong?

아바타
취소
관련 게시물 답글 화면 활동
1
1월 19
8781
0
12월 24
1263
2
7월 24
3023
2
3월 22
11972
1
3월 21
3429