Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Extra Tools
  3. PDF Password Protection v 18.0
  4. Sales Conditions FAQ

PDF Password Protection

by Naim OUDAYET https://www.oudayet.com
Odoo
v 18.0 Third Party 13
Download for v 18.0 Deploy on Odoo.sh
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 98
Technical Name no_pdf_password_protection
LicenseLGPL-3
Websitehttps://www.oudayet.com
Versions 16.0 17.0 18.0 19.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 98
Technical Name no_pdf_password_protection
LicenseLGPL-3
Websitehttps://www.oudayet.com
Versions 16.0 17.0 18.0 19.0

PDF Password Protection

Encrypt any Odoo PDF report with a password - per report action, per recipient

Odoo 18 FREE GDPR Ready

The Problem

Odoo sends invoices, payslips, and quotations as unprotected PDFs. Anyone who intercepts the email or finds the file on a shared drive can open it.

Without this module

🔓

PDFs leave Odoo unencrypted. No password required to open them. Anyone with the file can read sensitive data.

With this module

🔒

PDFs are encrypted at render time. Only the recipient who knows the password can open them.

4 Password Modes

Choose how the password is determined - per report action.

🔑
Static Password

Same password for every PDF of this report type. Fits internal documents.

🏢
Partner VAT

Password = partner's VAT/tax ID. Each invoice has its own password the customer already knows.

📞
Partner Phone

Password = partner's phone number (spaces stripped). Fits payslips and personal documents.

✉
Partner Email

Password = partner's email. Unique per contact, easy for the recipient to remember.

Every dynamic mode falls back to the static password when the partner field is empty.

Real-World Scenarios

Payslips to employees

HR emails monthly payslips to each employee. Mode Phone means every payslip is encrypted with the employee's own phone number - something they already know, no extra channel needed to share a password.

Invoices to B2B customers

Mode VAT: each invoice is locked with the customer's tax ID. The customer already has their VAT on file; no hand-off needed. Meets many GDPR and accounting-compliance expectations out of the box.

Internal financial reports

Reports that circulate only inside the company. Mode Static with a shared team password keeps the file readable for the finance team but protects it if the file leaks.

One-off contracts / portal downloads

Mode Email: the download password is the contact's email address. Recipients never need to look up a password - they type what they already use to log in.

How It Works

1
Enable

Go to Settings > Technical > Reports. Open any report action and tick "Enable PDF Password Protection".

2
Configure

Pick a mode (Static / VAT / Phone / Email). Optionally set a static fallback password used when the partner field is empty.

3
Done

Every PDF that Odoo renders from that report is encrypted. Recipients need the password to open it.

Installation

Two steps. The Python dependency must be installed first - the module itself won't refuse to install without it, but encryption will be silently no-op.

Step 1 - server side

Install PyPDF2
pip install PyPDF2

Run this on the Odoo server where reports are rendered. pypdf also works as a drop-in replacement.

Step 2 - in Odoo

Install the module

Apps menu → remove the Apps filter → search "PDF Password Protection" → Install. Then open Settings > Technical > Reports to configure individual reports.

Works With Every QWeb PDF Report

Invoices, quotations, delivery slips, payslips, and any custom report you've built yourself.

Invoices
Quotations
Purchase Orders
Delivery Slips
Payslips
Any Custom Report

Dynamic modes (VAT / Phone / Email) resolve the partner from record.partner_id or the record itself if it's a res.partner. For custom models that carry no partner reference, use Static mode or the fallback.

What This Module Doesn't Do

Honest scope matters. Here's exactly what's out of reach.

✗  Non-PDF reports

XLSX, CSV, HTML, and text reports are not encrypted. The override returns them unchanged.

✗  Email body / attachments

Only the report PDF itself is encrypted. The email body isn't, and neither are other attachments you add manually.

✗  Automatic password hints

The module doesn't tell the recipient their password. Add a hint ("this is your VAT") to your email template yourself.

✗  Per-record override

Configuration lives on the report action, not on each record. You can't configure "different password for this one invoice".

⚠  Silent graceful fallback

If no password can be resolved (empty partner field AND no static fallback), the PDF is returned unencrypted. Set a static fallback password if you want a hard guarantee.

⚠  PyPDF2 must be installed

If the Python library isn't installed on the Odoo server, the module loads but encryption is a no-op. A warning appears in the log on startup.

🛡 A Note on PDF Encryption Strength

PDF password protection is convenience crypto, not TLS-grade encryption. It stops a casual viewer with Adobe Reader. It does not stop a determined attacker with time and open-source tools. Use it as a meaningful deterrent and a compliance checkbox (HIPAA, GDPR), not as your only defence. For truly sensitive data, pair it with TLS email transport, access logs, and short retention windows. PyPDF2 uses RC4 / AES-128 depending on the PDF version.

FAQ

What if a partner's VAT has spaces or special characters?

The VAT value is used verbatim. Phone numbers get spaces stripped; everything else passes through unchanged.

Does encryption slow down PDF generation?

A few milliseconds per page. For batch prints (50+ invoices), expect about half a second of overhead total. Negligible for most use cases.

What happens if encryption fails at runtime?

The original (unencrypted) PDF is returned and the error is written to the Odoo log. Reports never fail outright - the user gets their document either way. Monitor your logs if this matters to you.

Can I disable protection for a specific recipient?

Configuration is per report action, not per recipient. The cleanest workaround is to duplicate the report action and leave one copy unprotected.

Will this break when Odoo updates?

The module overrides _render_qweb_pdf, which is stable Odoo API. Every version branch (16.0 / 17.0 / 18.0 / 19.0) ships tests that verify the integration end-to-end on that specific version.

Does it work on Odoo.sh / Odoo Online?

On Odoo.sh yes (you control requirements.txt). On Odoo Online / SaaS, custom Python packages cannot be installed, so this module won't encrypt - use self-hosted or Odoo.sh.

Technical Details

Module
no_pdf_password_protection
Version
18.0.1.0.0
Depends on
base
Python dep
PyPDF2 (or pypdf)
License
LGPL-3 (Free / Open Source)
Mechanism
Overrides _render_qweb_pdf on ir.actions.report
Test coverage
32 unit tests (resolver + encryption, edge cases)

PDF Password Protection - Free, open source, Odoo 18
© Naim OUDAYET - LGPL-3 License

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with