Odoo Help

Welcome!

This community 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.

0

Setting header to qweb report external layout

By
Javier Batres Velásquez
on 4/30/15, 8:18 PM 1,463 views

Hello i am overwritting th template for sale.order and right now everything is ok, but i need to set my header, I understand that this function ike this:


<external_layout>

     <external_layout_header />

      <My_Content />

     <extrernal_layout_footer />

</external_layout>


This is the method that i have understood, but this doesnt work fine, first the header have the property "company.logo" and this doesn't exist, for this i have replaced that with "company.logo_web". This is not trouble, but when i print my report, this doesn't call the header or the footer, and if I try to set the external_layout_header, this say that company.logo_web o company.logo doesn't exist and this is not functional with a base64/png that is the format for the image. And when i have tried change the source of report module for receive the image with this: --<img t-field="company.logo_web" t-field-options='{ "widget" : "image" }' />--


The trouble of put my logo image on my div "page" this have so many "margin-top" on the page.


If can someone say what can i do, please say me. 

1

Akhil P Sivan

--Akhil P Sivan--
3423
| 5 3 6
Kochi, India
--Akhil P Sivan--

Interested in exploring Odoo both technically & functionality wise.

email-id : akhilpsivan01@gmail.com

Akhil P Sivan
On 4/30/15, 11:32 PM

Hi,

You want to overirde the report header right? "company.logo" means the company logo you are uploading in the front end. You don't need that in report? How did you set "logo_web", is it a binary field by inheriting res.company?If yes, you should give like this report:

<img t-if="company.logo_web" t-att-src="'data:image/png;base64,%s' % company.logo_web" style="max-height: 45px;"/>

I can help you with any report template. contact: akhilpsivan@outlook.com

0
Carlos
On 11/20/15, 2:53 PM

i need add a image to footer with my own module but the image can not show up, help...

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 4/30/15, 8:18 PM
Seen: 1463 times
Last updated: 11/20/15, 2:53 PM