| __pycache__ | ||
| controllers | ||
| data | ||
| models | ||
| static/src | ||
| views | ||
| __init__.py | ||
| __manifest__.py | ||
| README.md | ||
Web Direct Print Module for Odoo 18
This module enables direct printing of reports to local printers connected to the user's computer without downloading PDF files. It uses browser printing capabilities for a seamless printing experience.
Features
- Direct print from web interface to local printer
- Integration with existing report actions
- Browser-based printing without downloads
- Support for all standard Odoo reports
- Direct print button in report dialogs
Installation
- Place the
web_direct_printfolder in your Odoo addons directory - Update your Odoo configuration to include this directory in
addons_path - Restart your Odoo server
- Install the module from Apps menu (search for "Web Direct Print")
Usage
Once installed, the module works automatically with existing reports:
- When viewing a document (Invoice, Sale Order, Purchase Order, etc.), click the print button
- Instead of downloading a PDF, you'll see options to print directly
- Select "Direct Print" to send the report directly to your default printer
- The browser's print dialog will appear, allowing you to select your printer and print settings
Technical Details
The module works by:
- Intercepting report generation requests
- Converting reports to PDF in the backend
- Sending the PDF data to the browser as a blob
- Using JavaScript to create a temporary iframe with the PDF
- Calling the browser's print function on the iframe
Browser Compatibility
This module relies on browser printing capabilities, which are available in all modern browsers (Chrome, Firefox, Safari, Edge). For best results, use the latest version of your preferred browser.
Troubleshooting
Browser Settings
Make sure your browser allows popups from your Odoo instance, as some browsers may block the print dialog.
Printer Access
The module sends print jobs to the browser's default printer. Users can change printer settings in the browser's print dialog.
Security Restrictions
Some browsers may have security restrictions that prevent direct printing. If direct print doesn't work, the module will fall back to opening the report in a new tab where users can manually print using Ctrl+P.
Limitations
- Requires user to have a local printer configured
- Browser-dependent functionality
- May not work in all network configurations
- Users need to confirm print dialog (cannot print silently)
Security
The module follows Odoo's security model and only allows users to print documents they have access to.