Reputation: 721
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
.
This is my report
configuration
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>
<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
I just change the first line.
<t t-name="account.report_invoice_document_copySample">
Upvotes: 0
Views: 641
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