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

Hello All,

I have two types fields one is binary and another is Html type And i want to display both fields on template. My binary field image display on template form but html not display. So, Anyone suggest me how to format html as binary to display my image? Below is my code for template where Binary image display but html field image not.

Thanks in advance

message = fields.Html('Message')
image = fields.Binary('Image')

# For Binary
<a class="thumbnail fancybox" rel="ligthbox" t-att-href="'data:image/png;base64,'+widget.image">
    <img class="align-self-center rounded-circle mr-3" alt=""
    t-att-src="'data:image/png;base64,'+widget.image"/>
</a>
# For Html
<a class="thumbnail fancybox" rel="ligthbox" t-att-href="widget.message">
    <img class="align-self-center rounded-circle mr-3" alt=""
    t-att-src="widget.message"/>
</a>
아바타
취소
작성자 베스트 답변

Hello All,

i got solution for above problem. my problem solved with following module https://www.odoo.com/apps/modules/11.0/html_image_url_extractor/

Thanks

아바타
취소
관련 게시물 답글 화면 활동
2
9월 19
5161
2
2월 24
3315
1
8월 23
4909
6
4월 23
17206
2
12월 22
6401