Odoo Help

0
3 Answers
1
GiusyG
11/21/18, 10:58 AM

Hi!! This is an example of a template in which I edit a header in Odoo 12.

<template id="external_layout_header" inherit_id="web.external_layout_standard">
<xpath expr="//div[@class='header']" position="replace">
<div class="header" style="font-family: 'Roboto', sans-serif;
font-weight: bold;">
<img t-if="company.logo"
t-att-src="'data:image/png;base64,%s' % company.logo"
style="height: 100px;
width: 100px;"/>

<div style="margin-top: 15px;
color: blue;
font-size: 12px;"
t-esc="company.name.encode('ascii', 'ignore').upper()"/>
</div>
</xpath>
</template>
3 Comments
Talmid
11/26/18, 10:16 AM

I tried with the boxed, but it doesn't work for me. I did it in a module. Can you help me how you implemented this exactly? This is what I need actually.

GiusyG
11/26/18, 10:22 AM

<template id="external_layout_header" inherit_id="web.external_layout_clean">

<xpath expr="//div[@class='o_clean_header']" position="replace">

<div class="o_clean_header" style="font-family: 'Roboto', sans-serif;

font-weight: bold;">

<img t-if="company.logo" t-att-src="image_data_uri(company.logo)" alt="Logo"

style="height: 100px;width: 100px;"/>

<div style="margin-top: 15px;

color: blue;

font-size: 12px;"

t-esc="company.name.encode('ascii', 'ignore').upper()"/>

</div>

</xpath>

</template>

remember to include " web "in your dependencies.

Talmid
11/26/18, 10:33 AM

It actually works, I forgot to add it in the manifest. Thank you so much!

1
Bouabaker Abdallah
11/6/18, 9:48 AM

Hi @Talmid
in Odoo 11 and 12 you can change the reporting template

There are 4 template in odoo:

Standard, Boxed, clean, background

 you can customise the header and footer after if you add your customisation in the 4 template !

Ask a Question
Writer
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