コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
3144 ビュー

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



アバター
破棄
最善の回答

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

アバター
破棄
関連投稿 返信 ビュー 活動
1
6月 23
2570
1
6月 24
4187
1
7月 21
3614
1
3月 15
4919
0
4月 25
2618