63 lines
2.5 KiB
Markdown
63 lines
2.5 KiB
Markdown
# 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
|
|
|
|
1. Place the `web_direct_print` folder in your Odoo addons directory
|
|
2. Update your Odoo configuration to include this directory in `addons_path`
|
|
3. Restart your Odoo server
|
|
4. Install the module from Apps menu (search for "Web Direct Print")
|
|
|
|
## Usage
|
|
|
|
Once installed, the module works automatically with existing reports:
|
|
|
|
1. When viewing a document (Invoice, Sale Order, Purchase Order, etc.), click the print button
|
|
2. Instead of downloading a PDF, you'll see options to print directly
|
|
3. Select "Direct Print" to send the report directly to your default printer
|
|
4. The browser's print dialog will appear, allowing you to select your printer and print settings
|
|
|
|
## Technical Details
|
|
|
|
The module works by:
|
|
|
|
1. Intercepting report generation requests
|
|
2. Converting reports to PDF in the backend
|
|
3. Sending the PDF data to the browser as a blob
|
|
4. Using JavaScript to create a temporary iframe with the PDF
|
|
5. 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. |