Skip to content

Add wkhtmltopdf installation support for Odoo PDF reports #6

@trisdoan

Description

@trisdoan

Summary

Odoo PDF reports require wkhtmltopdf with patched Qt (custom Qt 4.8). Standard OS packages ship unpatched version, causing headers/footers to fail silently. Manual install is error-prone with undocumented dependencies. The project is archived with CVE-2022-35583.

Problem Details

  • Odoo checks wkhtmltopdf --version for "(with patched qt)" string
  • Standard apt install wkhtmltopdf installs unpatched version → broken reports

Version Matrix

  • Odoo 10-15: wkhtmltopdf 0.12.5-1
  • Odoo 16+: wkhtmltopdf 0.12.6.1-3

Scenario 1: Local Development

Solution:


Scenario 2: Production

Environment: Linux servers, Docker

Risks:

  • CVE-2022-35583 exposure in unmaintained Qt 4.8
  • wkhtmltopdf runs in Odoo process space (attack surface)
  • Memory spikes during PDF generation affect Odoo stability
  • No security updates (project archived Aug 2023)

Solution:
using kwkhtmltopdf:

  • Pros: isolation: wkhtmltopdf runs in separate Docker container
  • Cons: needs docker, HTTP overhead (~50-100ms per PDF)

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions