The Report URL Timeout Problem
You click "Print" on an invoice or sales order and nothing happens. After 60 seconds, you get a timeout error — or worse, a blank PDF downloads. The Odoo logs show something like this:
WARNING odoo.addons.base.models.ir_actions_report: wkhtmltopdf: Blocked access to file
ERROR odoo.http: Exception during PDF report generation
TimeoutError: Report generation timed out
# Or in the wkhtmltopdf output:
Loading pages (1/6)
Error: Failed loading page http://localhost:8069/report/html/...
(sometimes it will use http://curved-banana:0/report/html/...)This happens because Odoo uses wkhtmltopdf to convert HTML to PDF, and wkhtmltopdf makes an HTTP request back to Odoo to fetch the report HTML. If that internal request fails, the report fails.
How Odoo Report Generation Works
Understanding the flow explains why it breaks:
- User clicks "Print" in the browser
- Browser sends request to Odoo:
GET /report/pdf/account.report_invoice/42 - Odoo calls wkhtmltopdf with the URL:
http://{report.url}/report/html/account.report_invoice/42 - wkhtmltopdf makes an HTTP request to that URL to fetch the HTML
- wkhtmltopdf converts the HTML to PDF
- Odoo returns the PDF to the browser
The critical point is step 3-4: wkhtmltopdf needs to reach Odoo via HTTP. The report.url system parameter controls what URL wkhtmltopdf uses.
Cause 1: report.url Not Set or Wrong
Check your current report.url setting:
# In Odoo shell:
env['ir.config_parameter'].sudo().get_param('report.url')
# Or in Settings → Technical → Parameters → System Parameters
# Search for 'report.url'If it is not set, Odoo tries to auto-detect it — which often fails in Docker, behind proxies, or with custom hostnames.
# Fix: Set report.url to point to Odoo's internal HTTP address
# Settings → Technical → System Parameters → Create
# Key: report.url
# Value: http://127.0.0.1:8069
# Or via shell:
env['ir.config_parameter'].sudo().set_param(
'report.url', 'http://127.0.0.1:8069'
)Docker Environments
In Docker, 127.0.0.1 refers to the container itself. Use the Docker service name:
# docker-compose.yml service name is 'odoo'
# Set report.url to:
http://odoo:8069
# Or use the container's internal IP
docker inspect odoo_container | grep IPAddress
# Set report.url to: http://172.18.0.5:8069Cause 2: wkhtmltopdf Not Installed or Wrong Version
Odoo requires a specific patched version of wkhtmltopdf with headless Qt WebKit support.
# Check installed version
wkhtmltopdf --version
# Must show: wkhtmltopdf 0.12.6 (with patched qt)
# If wrong version or not installed:
# Ubuntu 22.04:
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_amd64.deb
sudo apt install -y ./wkhtmltox_0.12.6.1-3.jammy_amd64.deb
# Ubuntu 20.04:
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.focal_amd64.deb
sudo apt install -y ./wkhtmltox_0.12.6.1-3.focal_amd64.debCause 3: Odoo Workers and Timeout Limits
When Odoo runs with workers, report generation competes for worker slots. If all workers are busy, wkhtmltopdf's internal request queues and times out.
# In odoo.conf — increase time limits for reports:
limit_time_cpu = 600
limit_time_real = 1200
limit_time_real_cron = -1
# Ensure enough workers for concurrent report requests
# Rule of thumb: workers = (2 * CPU cores) + 1
workers = 5Cause 4: Nginx Proxy Timeout
If Odoo is behind nginx, the proxy may timeout before wkhtmltopdf finishes.
# In nginx server block:
location / {
proxy_pass http://127.0.0.1:8069;
proxy_read_timeout 720s;
proxy_connect_timeout 720s;
proxy_send_timeout 720s;
}Cause 5: SSL/HTTPS Mismatch
If report.url uses HTTPS but the internal certificate is self-signed, wkhtmltopdf rejects it.
# Fix 1: Use HTTP for internal report.url (recommended)
# report.url = http://127.0.0.1:8069
# Fix 2: Tell wkhtmltopdf to ignore SSL errors
# In Odoo source or custom module:
# Add '--no-stop-slow-scripts' and '--quiet' to wkhtmltopdf commandCause 6: Large Reports With Many Pages
Printing hundreds of invoices at once exhausts memory and time limits.
# Fix: Increase memory limits in odoo.conf
limit_memory_hard = 4294967296 # 4GB
limit_memory_soft = 2147483648 # 2GB
# Better fix: batch print in groups of 50
# Or use a background job for large print runsDebugging Report Generation
# Test wkhtmltopdf directly
wkhtmltopdf http://127.0.0.1:8069/report/html/account.report_invoice/1 /tmp/test.pdf
# Run Odoo with debug logging for reports
./odoo-bin --log-handler=odoo.addons.base.models.ir_actions_report:DEBUG
# Check if report.url is reachable from the server
curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:8069/web/loginQuick Fix Checklist
- Set
report.url = http://127.0.0.1:8069in System Parameters - Install patched wkhtmltopdf 0.12.6
- Increase
limit_time_realto 1200 in odoo.conf - Increase nginx
proxy_read_timeoutto 720s - Restart Odoo after all changes