Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
3032 Weergaven

Hello,

Please, can anyone assist in giving me tips on how to add a second company logo to the PDF printout of the Quotation/Sales Order report on Odoo Version 16 Enterprise?

Any contribution will be appreciated. A sample expected output is attached below.

Thanks



Avatar
Annuleer
Beste antwoord

Hi,

Try like below

<odoo>
  <data>
    <!-- Inherit from existing report template -->
    <template id="report_saleorder_document_inherit" inherit_id="sale.report_saleorder_document">
      <!-- Add the second company logo -->
      <xpath expr="//div[@class='header']/table/tbody/tr/td[1]" position="after">
        <td style="text-align: right;">
          <img class="logo" t-if="doc.company_id.logo" t-att-src="get_logo_image(doc.company_id.logo)" width="200"/>
          <img class="second-logo" t-att-src="get_logo_image('your_module_name.static/src/img/second_company_logo.png')" width="200"/>
        </td>
      </xpath>
    </template>
  </data>
</odoo>


Regards

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
jun. 23
2501
1
jun. 24
4095
1
jul. 21
3495
1
mrt. 15
4817
0
apr. 25
2544