Passa al contenuto
Odoo Menu
  • Accedi
  • Provalo gratis
  • App
    Finanze
    • Contabilità
    • Fatturazione
    • Note spese
    • Fogli di calcolo (BI)
    • Documenti
    • Firma
    Vendite
    • CRM
    • Vendite
    • Punto vendita Negozio
    • Punto vendita Ristorante
    • Abbonamenti
    • Noleggi
    Siti web
    • Configuratore sito web
    • E-commerce
    • Blog
    • Forum
    • Live chat
    • E-learning
    Supply chain
    • Magazzino
    • Produzione
    • PLM
    • Acquisti
    • Manutenzione
    • Qualità
    Risorse umane
    • Dipendenti
    • Assunzioni
    • Ferie
    • Valutazioni
    • Referral dipendenti
    • Parco veicoli
    Marketing
    • Social marketing
    • E-mail marketing
    • SMS marketing
    • Eventi
    • Marketing automation
    • Sondaggi
    Servizi
    • Progetti
    • Fogli ore
    • Assistenza sul campo
    • Helpdesk
    • Pianificazione
    • Appuntamenti
    Produttività
    • Comunicazioni
    • Approvazioni
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    App di terze parti Odoo Studio Piattaforma cloud Odoo
  • Settori
    Retail
    • Libreria
    • Negozio di abbigliamento
    • Negozio di arredamento
    • Alimentari
    • Ferramenta
    • Negozio di giocattoli
    Cibo e ospitalità
    • Bar e pub
    • Ristorante
    • Fast food
    • Pensione
    • Grossista di bevande
    • Hotel
    Agenzia immobiliare
    • Agenzia immobiliare
    • Studio di architettura
    • Edilizia
    • Gestione immobiliare
    • Impresa di giardinaggio
    • Associazione di proprietari immobiliari
    Consulenza
    • Società di contabilità
    • Partner Odoo
    • Agenzia di marketing
    • Studio legale
    • Selezione del personale
    • Audit e certificazione
    Produzione
    • Tessile
    • Metallo
    • Arredamenti
    • Alimentare
    • Birrificio
    • Ditta di regalistica aziendale
    Benessere e sport
    • Club sportivo
    • Negozio di ottica
    • Centro fitness
    • Centro benessere
    • Farmacia
    • Parrucchiere
    Commercio
    • Tuttofare
    • Hardware e assistenza IT
    • Ditta di installazione di pannelli solari
    • Calzolaio
    • Servizi di pulizia
    • Servizi di climatizzazione
    Altro
    • Organizzazione non profit
    • Ente per la tutela ambientale
    • Agenzia di cartellonistica pubblicitaria
    • Studio fotografico
    • Punto noleggio di biciclette
    • Rivenditore di software
    Carica tutti i settori
  • Community
    Apprendimento
    • Tutorial
    • Documentazione
    • Certificazioni 
    • Formazione
    • Blog
    • Podcast
    Potenzia la tua formazione
    • Programma educativo
    • Scale Up! Business Game
    • Visita Odoo
    Ottieni il software
    • Scarica
    • Versioni a confronto
    • Note di versione
    Collabora
    • Github
    • Forum
    • Eventi
    • Traduzioni
    • Diventa nostro partner
    • Servizi per partner
    • Registra la tua società di contabilità
    Ottieni servizi
    • Trova un partner
    • Trova un contabile
    • Incontra un esperto
    • Servizi di implementazione
    • Testimonianze dei clienti
    • Supporto
    • Aggiornamenti
    GitHub Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Richiedi una demo
  • Prezzi
  • Aiuto

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

  • CRM
  • e-Commerce
  • Contabilità
  • Magazzino
  • PoS
  • Progetti
  • MRP
All apps
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
Assistenza

Odoo times out when generating an invoice for 2,000 to 8,000 Sales Orders - ie: 40,000 invoice lines

Iscriviti

Ricevi una notifica quando c'è un'attività per questo post

La domanda è stata contrassegnata
salescommunityinvoiceV15
1 Rispondi
2244 Visualizzazioni
Avatar
Elizabeth Cravioto

Currently we have a problem generating the invoice of many sales orders at once, in operation we have a customer who requires an invoice for the set of thousands of sales orders (per month they can be between 2,000-8,000) and always appears a time out error when generating it. Is there any limitation in the number of lines on the invoice or some way to solve this problem to carry out the operation? Sales orders can have between 1 and 5 lines, so we’re talking about around 40,000 lines in a single invoice. Any ideas?

0
Avatar
Abbandona
Avatar
Akshat Gupta
Risposta migliore

Hello,

This issue is quite common when attempting to generate a single invoice with a very large number of lines (e.g. 40,000+). Odoo is not optimized out-of-the-box to handle invoices of such scale due to performance limitations at both the ORM and database level. Here's some insight and recommendations:

⚠️ Why You're Seeing a Timeout

  • Odoo tries to compute taxes, totals, and validations for each line item.
  • Account move line creation, reconciliation, and posting all happen in one transaction.
  • The HTTP timeout or even PostgreSQL query performance can become a bottleneck.
  • The browser and backend server memory/CPU usage spikes significantly for such a massive invoice.

🛠 Possible Solutions

✅ 1. Batch Processing

Split the sales orders into multiple invoices, grouped logically (e.g. weekly or by SO tags).

  • This reduces load per invoice and helps avoid timeouts.
  • You can then group the invoices under a single customer statement or use a custom PDF merge (if needed for reporting).

✅ 2. Asynchronous Processing (Queue Job)

Use the queue_job module (OCA) or similar to run invoice generation as a background job, which:

  • Runs outside the HTTP request-response cycle.
  • Avoids timeouts and uses worker processes.
  • Allows monitoring of job completion.

✅ 3. Optimize Backend Performance

  • Increase server limits: request timeout, workers, and memory limits.
  • Use PostgreSQL indexing and query tuning.
  • If you're using Python loop + ORM, consider using cr.execute() for bulk inserts.

✅ 4. Invoice Consolidation Logic

Instead of one invoice with all lines, build a custom summary logic:

  • Group similar lines (e.g. same product/tax) together.
  • One line can represent multiple sales via quantity/description like “Service X (covered from SO001 to SO999)”.

✅ 5. Custom PDF Reporting

Generate one invoice per batch, but merge them only in the PDF output as a single report for the client — if that's the main goal.

❌ Things to Avoid

  • Don't try to increase timeout arbitrarily — it can cause server instability.
  • Avoid running this operation on production without testing on a staging environment first.

0
Avatar
Abbandona
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!

Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!

Registrati
Post correlati Risposte Visualizzazioni Attività
Sales upload Template required
sales invoice
Avatar
Avatar
2
dic 23
4015
Sales orders that have been billed are kept with "To Invoice" status Risolto
sales invoice
Avatar
Avatar
Avatar
Avatar
6
mar 22
10241
How to hide the producty internal reference on the printed invoice? (I did it on the SO!) Risolto
sales community v11
Avatar
Avatar
Avatar
2
giu 25
10049
Modify invoice content make it disconnect with its sales order
sales invoice sales.order
Avatar
Avatar
1
gen 25
2231
Show serial number of a product on the invoice PDF Risolto
sales invoice serial_number
Avatar
Avatar
Avatar
Avatar
3
mag 24
5581
Community
  • Tutorial
  • Documentazione
  • Forum
Open source
  • Scarica
  • Github
  • Runbot
  • Traduzioni
Servizi
  • Hosting Odoo.sh
  • Supporto
  • Aggiornamenti
  • Sviluppi personalizzati
  • Formazione
  • Trova un contabile
  • Trova un partner
  • Diventa nostro partner
Chi siamo
  • La nostra azienda
  • Branding
  • Contattaci
  • Lavora con noi
  • Eventi
  • Podcast
  • Blog
  • Clienti
  • Note legali • Privacy
  • Sicurezza
الْعَرَبيّة 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 è un gestionale di applicazioni aziendali open source pensato per coprire tutte le esigenze della tua azienda: CRM, Vendite, E-commerce, Magazzino, Produzione, Fatturazione elettronica, Project Management e molto altro.

Il punto di forza di Odoo è quello di offrire un ecosistema unico di app facili da usare, intuitive e completamente integrate tra loro.

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