Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
3150 Ansichten

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
Verwerfen
Beste Antwort

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
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Juni 23
2575
1
Juni 24
4193
1
Juli 21
3624
1
März 15
4921
0
Apr. 25
2621