Odoo Help

1
3 Answers
2
Avatar

Manish Kumar Bohra

--Manish Kumar Bohra--

1088
| 5 3 8
Bikaner, India
--Manish Kumar Bohra--


Manish Kumar Bohra
9/19/18, 2:37 AM

Hello

You can try below code i think it's help you

<img t-if="obj.company_id.extra_logo"
t-att-src="'data:image/png;base64,%s' % obj.company_id.extra_logo"
style="max-width: 40px; max-height: 20px;"/>
1
Avatar

Mitul Shingala

--Mitul Shingala--

1798
| 5 2 7
Rajkot, India
--Mitul Shingala--

Odoo Developer

Mitul Shingala
10/8/18, 3:26 AM

Hello 

try below code,

<t t-if="obj.company_id.extra_logo">
<img t-att-src="'data:image/png;base64,%s' % to_text(obj.company_id.extra_logo)" style="max-height:1cm; max-width:4cm;"/>
</t>
0
Rakesh Vadeghar
9/19/18, 1:03 AM

hey try this

store your image in web/static/src/img

<img src="http://localhost:8069/web/static/src/img/your_logo.jpg" width="180" height="150" />

you can also try this

<img t-attf-src="data:image/*;base64,{{company.logo}}" t-att-alt="company.name" style="max-height: 100px;"/> 



Ask a Question
Writer
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now