Skip to Content
Odoo Menu
  • Prisijungti
  • Išbandykite nemokamai
  • Programėlės
    Finansai
    • Apskaita
    • Pateikimas apmokėjimui
    • Sąnaudos
    • Skaičiuoklė (BI)
    • Dokumentai
    • Pasirašymas
    Pardavimai
    • CRM
    • Pardavimai
    • Kasų sistema - Parduotuvė
    • Kasų sistema - Restoranas
    • Prenumeratos
    • Nuoma
    Svetainės
    • Svetainių kūrėjimo įrankis
    • El. Prekyba
    • Internetinis Tinklaraštis
    • Forumas
    • Tiesioginis pokalbis
    • eMokymasis
    Tiekimo grandinė
    • Atsarga
    • Gamyba
    • PLM
    • Įsigijimai
    • Priežiūra
    • Kokybė
    Žmogaus ištekliai
    • Darbuotojai
    • Įdarbinimas
    • Atostogos
    • Įvertinimai
    • Rekomendacijos
    • Transporto priemonės
    Rinkodara
    • Socialinė rinkodara
    • Rinkodara el. paštu
    • SMS rinkodara
    • Renginiai
    • Rinkodaros automatizavimas
    • Apklausos
    Paslaugos
    • Projektas
    • Darbo laiko žiniaraščiai
    • Priežiūros tarnyba
    • Pagalbos tarnyba
    • Planavimas
    • Rezervacijos
    Produktyvumas
    • Diskucija
    • Patvirtinimai
    • IoT
    • VoIP
    • Žinių biblioteka
    • WhatsApp
    Trečiųjų šalių programos Odoo Studija Odoo debesijos platforma
  • Pramonės šakos
    Mažmeninė prekyba
    • Knygynas
    • Drabužių parduotuvė
    • Baldų parduotuvė
    • Maisto prekių parduotuvė
    • Techninės įrangos parduotuvė
    • Žaislų parduotuvė
    Food & Hospitality
    • Barai ir pub'ai
    • Restoranas
    • Greitasis maistas
    • Guest House
    • Gėrimų platintojas
    • Hotel
    Nekilnojamasis turtas
    • Real Estate Agency
    • Architektūros įmonė
    • Konstrukcija
    • Estate Managament
    • Sodininkauti
    • Turto savininkų asociacija
    Konsultavimas
    • Accounting Firm
    • Odoo Partneris
    • Marketing Agency
    • Teisinė firma
    • Talentų paieška
    • Auditai & sertifikavimas
    Gamyba
    • Textile
    • Metal
    • Furnitures
    • Maistas
    • Brewery
    • Įmonių dovanos
    Sveikata & Fitnesas
    • Sporto klubas
    • Akinių parduotuvė
    • Fitneso Centras
    • Sveikatos praktikai
    • Vaistinė
    • Kirpėjas
    Trades
    • Handyman
    • IT įranga ir palaikymas
    • Saulės energijos sistemos
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Kiti
    • Nonprofit Organization
    • Aplinkos agentūra
    • Reklaminių stendų nuoma
    • Fotografavimas
    • Dviračių nuoma
    • Programinės įrangos perpardavėjas
    Browse all Industries
  • Bendrija
    Mokykitės
    • Mokomosios medžiagos
    • Dokumentacija
    • Sertifikatai
    • Mokymai
    • Internetinis Tinklaraštis
    • Tinklalaidės
    Skatinkite švietinimą
    • Švietimo programa
    • Scale Up! Verslo žaidimas
    • Aplankykite Odoo
    Gaukite programinę įrangą
    • Atsisiųsti
    • Palyginkite versijas
    • Leidimai
    Bendradarbiauti
    • Github
    • Forumas
    • Renginiai
    • Vertimai
    • Tapkite partneriu
    • Services for Partners
    • Registruokite jūsų apskaitos įmonę
    Gaukite paslaugas
    • Susiraskite partnerį
    • Susirask buhalterį
    • Susitikti su konsultantu
    • Diegimo paslaugos
    • Klientų rekomendavimas
    • Palaikymas
    • Atnaujinimai
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Gaukite demo
  • Kainodara
  • Pagalba

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Apskaita
  • Atsarga
  • PoS
  • Projektas
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
Pagalba

How to Create Custom Invoice PDF Report with Odoo Module

Prenumeruoti

Get notified when there's activity on this post

This question has been flagged
modulesinvoicereportingpdfreport
1 Atsakyti
7870 Rodiniai
Portretas
headkit

I'm looking to generate a customized PDF report for invoices. I've successfully created a similar report for quotes 8and also for invoices within Flectra), but I'm facing some challenges when it comes to invoices.

Could someone kindly guide me on the step-by-step process of creating a custom Invoice PDF report using a module in Odoo 17? I'm particularly interested in understanding the necessary configurations, QWeb templates, and any other relevant details that would help me achieve this.

I want to understand what's the difference in concept bewteen sales order/quote and invoices.

Thnx!

-1
Portretas
Atmesti
headkit
Autorius

In Flectra I had to add a template file with

<template id="report_aime_invoice" inherit_id="account.report_invoice_document">

where I then replaced the PAGE section with

<xpath expr="//div[hasclass('page')]" position="replace">

Portretas
Mily Shajan
Best Answer

Hi 

You can create a report action for the account.move as the model and binding model, and then update the proper template with style and fields.

Create PDF Report in Odoo 17 

PDF Report


Regards

0
Portretas
Atmesti
headkit
Autorius

Thank you for your answer, but it just explains how to add a custom report, ie. for products. In my case I want to override the invoice report and for that I need direct instructions about how to register the record (from my understanding), like
<record id="custom_invoice_layout" model="ir.actions.report">...
or how to register my qweb template file
<template id="invoice_layout_custom">...

headkit
Autorius

from your suggestion it would be something like

<record id="custom_invoice_layout" model="ir.actions.report">
<field name="name">Custom Invoice Layout</field>
<field name="model">account.move</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">custom_odoo_templates.invoice_layout_custom</field>
<field name="report_file">custom_odoo_templates.invoice_layout_custom</field>
<field name="report_file">account.report_invoice</field>
<!-- <field name="print_report_name">'Invoice_%s' % (object.name)</field> -->
<field name="binding_model_id" ref="account.model_account_move"/>
<field name="binding_type">report</field>
</record>

headkit
Autorius

if I use that, I get the error
odoo.addons.base.models.ir_qweb.QWebException: Error while render the template
KeyError: 'doc'
Template: custom_odoo_templates.quote_layout_custom

so for me it looks like the invoice report is being rendered using the (overridden) quote (sale.order) template.

headkit
Autorius

I now deleted the <record> and just work with
<template id="invoice_layout_custom" inherit_id="account.report_invoice_with_payments">
I also added t-if="doc" everywhere in the <template id="quote_layout_custom"> tags and it now looks like the rendering reaches the default invoice templat as I now get the KeyError
KeyError: 'o'
Template: account.report_invoice_with_payments
Questions arise like: Why does it renders the sale order template before? And why is there no o-Object any more?

Mily Shajan

If you need to create a new invoice report try this <record id="action_invoice_report" model="ir.actions.report">
<field name="name">Invoice Report</field>
<field name="model">account.move</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">invoice_report.report_invoice_template</field>
<field name="report_file">invoice_report.report_invoice_template</field>
<field name="print_report_name">'Report - %s' % (object.name)</field>
<field name="binding_model_id" ref="account.model_account_move"/>
<field name="binding_type">report</field>
</record>

otherwise, if you need to inherit the default invoice report and make changes use inherit_id and call this template account.report_invoice_document
<template id="report_invoice_document" inherit_id="account.report_invoice_document">
inside you can add the updates
</template>

headkit
Autorius

trying to inherit the default invoice report with

<record id="custom_invoice_layout" model="ir.actions.report">
<field name="name">Custom Invoice Layout</field>
<field name="model">account.move</field>
<field name="inherit_id">custom_odoo_templates.invoice_layout_custom</field>
</record>

I get the error

ValueError: Invalid field 'inherit_id' on model 'ir.actions.report'

Mily Shajan

inherit_id is in the report template, not in ir.actions_report model

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registracija
Related Posts Replies Rodiniai Veikla
Where can I download the simplest module with an RML report?
modules reporting
Portretas
Portretas
Portretas
2
kov. 15
4573
Displaying the conversion rate on the invoice report
accounting invoice reporting
Portretas
0
saus. 25
1965
Printed Offers and Reports are missing the headers and footers Solved
invoice reporting v15
Portretas
Portretas
Portretas
Portretas
4
liep. 23
8689
How to view detailed payment reports for invoices
invoice reporting Reports
Portretas
0
birž. 23
2531
Odoo Down payment show the individual products instead of just down payment
invoice reporting v15
Portretas
Portretas
1
kov. 25
3055
Bendrija
  • Mokomosios medžiagos
  • Dokumentacija
  • Forumas
Atvirasis kodas
  • Atsisiųsti
  • Github
  • Runbot
  • Vertimai
Paslaugos
  • Odoo.sh talpinimas
  • Palaikymas
  • Atnaujinti
  • Pritaikytas programavimo kūrimas
  • Švietimas
  • Susirask buhalterį
  • Susiraskite partnerį
  • Tapkite partneriu
Apie mus
  • Mūsų įmonė
  • Prekės ženklo turtas
  • Susisiekite su mumis
  • Darbo pasiūlymai
  • Renginiai
  • Tinklalaidės
  • Internetinis Tinklaraštis
  • Klientai
  • Teisinis • Privatumas
  • Saugumas
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo yra atvirojo kodo verslo programų rinkinys, kuris apima visas įmonės poreikius: CRM, El. Prekybą, Apskaitą, Atsargų, Kasų sistemą, Projektų valdymą ir kt.

Unikali Odoo vertės pasiūla – būti tuo pačiu metu labai lengvai naudojama ir visiškai integruota sistema.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now