Stykgwar
Stykgwar

Reputation: 721

How can I create another Invoice Template in Odoo Community(Saas)

I'm trying to create a new invoice template in my Odoo 17 Community (SaaS) with a customize header on it.

So what I did first is create a report, It now shows in my Invoice.

enter image description here

This is my report configuration

enter image description here

enter image description here

This is my QWEB for report_invoice_with_payments_copySample

<t t-name="account.report_invoice_with_payments_copySample">
      <t t-call="account.report_invoice_copySample">
           <t t-set="print_with_payments" t-value="True"/>
      </t>
</t>

enter image description here

<t t-name="account.report_invoice_copySample">
    <t t-call="web.html_container">
        <t t-foreach="docs" t-as="o">
            <t t-set="lang" t-value="o.partner_id.lang"/>
            <t t-if="o._get_name_invoice_report() == 'account.report_invoice_document_copySample'" t-call="account.report_invoice_document_copySample" t-lang="lang"/>
        </t>
    </t>
</t>

This is my report_invoice_document_copySample

enter image description here

I just change the first line.

<t t-name="account.report_invoice_document_copySample">

Upvotes: 0

Views: 641

Answers (1)

Yves Van Grembergen
Yves Van Grembergen

Reputation: 33

To create and edit Odoo 17 reports you can use their editor system by typing "/" and then select the block you want. Or you can code it in Qweb.

For both methods you need Odoo Studio in the SaaS installation.

I advice you to watch the demo https://www.youtube.com/live/iFghjU_hWMQ?si=wEW2_-m28wV4NocH

To code in Qweb, you need to go to Odoo Studio, go to the menu "Reports", select the report you want to edit. And there press on the button "Edit sources"

I advice you, certainly when you're going to code, to duplicate the database and extend the trial from 3 hours to 15 days.

Upvotes: 1

Related Questions