Skip to Content
Odoo Menu
  • Zaloguj się
  • Wypróbuj za darmo
  • Aplikacje
    Finanse
    • Księgowość
    • Fakturowanie
    • Wydatki
    • Arkusz kalkulacyjny (BI)
    • Dokumenty
    • Podpisy
    Sprzedaż
    • CRM
    • Sprzedaż
    • PoS Sklep
    • PoS Restauracja
    • Subskrypcje
    • Wypożyczalnia
    Strony Internetowe
    • Kreator Stron Internetowych
    • eCommerce
    • Blog
    • Forum
    • Czat na Żywo
    • eLearning
    Łańcuch dostaw
    • Magazyn
    • Produkcja
    • PLM
    • Zakupy
    • Konserwacja
    • Jakość
    Zasoby Ludzkie
    • Pracownicy
    • Rekrutacja
    • Urlopy
    • Ocena pracy
    • Polecenia Pracownicze
    • Flota
    Marketing
    • Marketing Społecznościowy
    • E-mail Marketing
    • SMS Marketing
    • Wydarzenia
    • Automatyzacja Marketingu
    • Ankiety
    Usługi
    • Projekt
    • Ewidencja czasu pracy
    • Usługi Terenowe
    • Helpdesk
    • Planowanie
    • Spotkania
    Produktywność
    • Dyskusje
    • Zatwierdzenia
    • IoT
    • VoIP
    • Baza wiedzy
    • WhatsApp
    Aplikacje trzecich stron Studio Odoo Odoo Cloud Platform
  • Branże
    Sprzedaż detaliczna
    • Księgarnia
    • Sklep odzieżowy
    • Sklep meblowy
    • Sklep spożywczy
    • Sklep z narzędziami
    • Sklep z zabawkami
    Żywienie i hotelarstwo
    • Bar i Pub
    • Restauracja
    • Fast Food
    • Pensjonat
    • Dystrybutor napojów
    • Hotel
    Agencja nieruchomości
    • Agencja nieruchomości
    • Biuro architektoniczne
    • Budowa
    • Zarządzanie nieruchomościami
    • Ogrodnictwo
    • Stowarzyszenie właścicieli nieruchomości
    Doradztwo
    • Biuro księgowe
    • Partner Odoo
    • Agencja marketingowa
    • Kancelaria prawna
    • Agencja rekrutacyjna
    • Audyt i certyfikacja
    Produkcja
    • Tekstylia
    • Metal
    • Meble
    • Jedzenie
    • Browar
    • Prezenty firmowe
    Zdrowie & Fitness
    • Klub sportowy
    • Salon optyczny
    • Centrum fitness
    • Praktycy Wellness
    • Apteka
    • Salon fryzjerski
    Transakcje
    • Złota rączka
    • Wsparcie Sprzętu IT
    • Systemy energii słonecznej
    • Szewc
    • Firma sprzątająca
    • Usługi HVAC
    Inne
    • Organizacja non-profit
    • Agencja Środowiskowa
    • Wynajem billboardów
    • Fotografia
    • Leasing rowerów
    • Sprzedawca oprogramowania
    Przeglądaj wszystkie branże
  • Community
    Ucz się
    • Samouczki
    • Dokumentacja
    • Certyfikacje
    • Szkolenie
    • Blog
    • Podcast
    Pomóż w nauce innym
    • Program Edukacyjny
    • Scale Up! Gra biznesowa
    • Odwiedź Odoo
    Skorzystaj z oprogramowania
    • Pobierz
    • Porównaj edycje
    • Wydania
    Współpracuj
    • Github
    • Forum
    • Wydarzenia
    • Tłumaczenia
    • Zostań partnerem
    • Usługi dla partnerów
    • Zarejestruj swoją firmę rachunkową
    Skorzystaj z usług
    • Znajdź partnera
    • Znajdź księgowego
    • Spotkaj się z doradcą
    • Usługi wdrożenia
    • Opinie klientów
    • Wsparcie
    • Aktualizacje
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Zaplanuj demo
  • Cennik
  • Pomoc

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

  • CRM
  • e-Commerce
  • Księgowość
  • Zapasy
  • PoS
  • Projekt
  • MRP
All apps
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Pomoc

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

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
salescommunityinvoiceV15
1 Odpowiedz
2296 Widoki
Awatar
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
Awatar
Odrzuć
Awatar
Akshat Gupta
Najlepsza odpowiedź

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
Awatar
Odrzuć
Podoba Ci się ta dyskusja? Dołącz do niej!

Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!

Zarejestruj się
Powiązane posty Odpowiedzi Widoki Czynność
Sales upload Template required
sales invoice
Awatar
Awatar
2
gru 23
4105
Sales orders that have been billed are kept with "To Invoice" status Rozwiązane
sales invoice
Awatar
Awatar
Awatar
Awatar
6
mar 22
10337
How to hide the producty internal reference on the printed invoice? (I did it on the SO!) Rozwiązane
sales community v11
Awatar
Awatar
Awatar
2
cze 25
10095
Modify invoice content make it disconnect with its sales order
sales invoice sales.order
Awatar
Awatar
1
sty 25
2321
Show serial number of a product on the invoice PDF Rozwiązane
sales invoice serial_number
Awatar
Awatar
Awatar
Awatar
3
maj 24
5711
Społeczność
  • Samouczki
  • Dokumentacja
  • Forum
Open Source
  • Pobierz
  • Github
  • Runbot
  • Tłumaczenia
Usługi
  • Hosting Odoo.sh
  • Wsparcie
  • Aktualizacja
  • Indywidualne rozwiązania
  • Edukacja
  • Znajdź księgowego
  • Znajdź partnera
  • Zostań partnerem
O nas
  • Nasza firma
  • Zasoby marki
  • Skontaktuj się z nami
  • Oferty pracy
  • Wydarzenia
  • Podcast
  • Blog
  • Klienci
  • Informacje prawne • Prywatność
  • Bezpieczeństwo Odoo
الْعَرَبيّة 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 to pakiet aplikacji biznesowych typu open source, które zaspokoją wszystkie potrzeby Twojej firmy: CRM, eCommerce, księgowość, inwentaryzacja, punkt sprzedaży, zarządzanie projektami itp.

Unikalną wartością Odoo jest to, że jest jednocześnie bardzo łatwe w użyciu i w pełni zintegrowane.

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