Skip to Content
Menu
This question has been flagged

Hi,

I'm trying to change the company logo in invoice through code. I have located a file which holds the code for generating invoices under account->views->report_invoice.xml but I'm unable to find the part which holds the code for header/logo image. Am i looking in the right file? If not, can you point me in the right file direction?

Thank you

Avatar
Discard
Best Answer

You can find the source code(odoo v12) for header in web->views->report_templates.xml.

Avatar
Discard
Author

Thanks Hardik i found it already and I tried replacing the header image but didn't seem to work. Don't know what i'm doing wrong. Below is the code. If you know anything please help or point the errors.

<template id="external_layout_standard_chrims" inherit_id="external_layout_standard">

<xpath expr="//div[@class='col-3 mb4']" position="replace">

<div class="col-3 mb4">

<img t-att-src="data:image/jpg;base64,account_analytic_account.invLogo" style="max-height: 45px;" alt="Logo"/>

</div>

</xpath>

</template>

Author

Thanks for the link but that is still unclear to me. My case here is that i declared a custom field in a model and asking the user to upload an image and now i want that image to appear in my qweb report. I have searched a lot and tried a few ways but nothing worked maybe it's because the db is not storing the image i mean when i view the data in the column it shows as empty but then again i can view the image in the ui. I tried using store=True, still no luck! Do you know why is this happening and also tell me how to refer to this image in qweb

Related Posts Replies Views Activity
0
Apr 19
2157
1
Mar 17
1901
2
Jun 24
554
2
Jan 22
1411
0
Jan 22
18