| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Point of Sale (point_of_sale)
• Restaurant (pos_restaurant) • Discuss (mail) • Inventory (stock) • Invoicing (account) |
| Lines of code | 1146 |
| Technical Name |
pos_network_printer_pyb |
| License | LGPL-3 |
| Website | https://www.pybeans.com |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Point of Sale (point_of_sale)
• Restaurant (pos_restaurant) • Discuss (mail) • Inventory (stock) • Invoicing (account) |
| Lines of code | 1146 |
| Technical Name |
pos_network_printer_pyb |
| License | LGPL-3 |
| Website | https://www.pybeans.com |
POS Network Printer
Print from Point of Sale to ESC/POS Network Printers without IOT Box. Complete solution for POS Retail and Restaurant with local or online server, featuring offline queue management and multiple printer support.
Key Features
Network Printer Support
Direct printing to ESC/POS network printers without requiring IOT Box hardware.
Restaurant Kitchen Printing
Configure multiple preparation printers for kitchen orders with category-based routing.
Offline Print Queue
Automatic queue management for failed prints with retry capability when printer comes back online.
Windows Printer Service
Dedicated Windows service for reliable printer communication with HTTPS security.
Printer Status Monitoring
Real-time printer status checking with visual indicators in POS interface.
Secure Communication
HTTPS encryption with certificate management and optional API key authentication.
Module Overview
The POS Network Printer module enables direct printing from Odoo Point of Sale to ESC/POS network printers without requiring an IOT Box. This comprehensive solution is designed for both retail and restaurant environments, supporting receipt printing, kitchen order printing, and preparation displays. The module includes intelligent offline queue management, real-time printer status monitoring, and a dedicated Windows printer service for reliable communication.
Configuration & Setup
Network Printer Configuration
- Create network printer devices with IP address and port
- Configure printer service URL and port in POS settings
- Enable network printing for receipt and preparation printers
- Set up optional API key for secure authentication
- Enable offline print queue for automatic retry
Restaurant Preparation Printers
- Configure multiple kitchen printers for different stations
- Assign product categories to specific printers
- Support for network printer type in preparation printer setup
- Automatic order routing based on product categories
- Independent queue management per printer
Module Features in Detail
Receipt Printing
- Direct Network Printing: Print receipts directly to network thermal printers
- High-Quality Output: Enhanced image processing for clear, readable receipts
- Automatic Fallback: Falls back to browser printing if service is unavailable
- Receipt Customization: Supports standard Odoo receipt templates
- Session Reports: Print POS session closing reports to network printers
- Multiple Copies: Support for printing multiple receipt copies
- Error Handling: Clear error messages with retry options
- Print Preview: View receipt before printing
Offline Print Queue Management
- Automatic Queuing: Failed prints automatically added to queue
- Per-Printer Queues: Separate queue for each configured printer
- Status Tracking: Track pending, success, and failed print jobs
- Manual Retry: Retry individual or multiple failed prints
- Queue Viewer: Visual interface to view and manage queued prints
- Bulk Operations: Clear queue or retry all failed prints
- Persistent Storage: Queue survives browser refresh and session changes
- Auto-Cleanup: Successful prints automatically removed from queue
Printer Status Monitoring
- Real-Time Status: Check printer online/offline status
- Service Health Check: Monitor printer service availability
- Visual Indicators: Color-coded status icons in POS interface
- Status Caching: Intelligent caching to reduce network overhead
- Automatic Checks: Periodic status checks during operation
- Queue Size Display: View number of pending jobs per printer
- Printer Menu: Quick access to printer status and queue
- Error Notifications: Clear alerts when printers go offline
Restaurant Kitchen Printing
- Preparation Printers: Configure multiple kitchen printers
- Category Routing: Route orders to printers based on product categories
- Order Modifications: Print order changes and notes
- Kitchen Display: Support for kitchen display systems
- Pre-bill Printing: Print pre-bills before payment
- Independent Queues: Each kitchen printer has its own queue
- Network Type Support: Full support for network printer type
- Flexible Configuration: Easy setup through POS settings
POS Interface Features
Printer Menu Button
Quick access button in POS navbar to view printer status and manage print queue
Print Queue Popup
Interactive popup to view, retry, and manage failed print jobs with detailed status
Status Widgets
Visual status indicators showing printer online/offline state and queue size
Module Screenshots
POS Settings - Network Printer Configuration
Enable network printing in POS settings. Configure the printer service IP address, port, and optional API key for authentication. Enable the print queue feature to automatically retry failed prints when printers come back online.
Create Network Printer
Create network printer devices by specifying the printer name, IP address, and port number. Each printer can be activated or deactivated as needed. These printers can be used for both receipt printing and kitchen order printing.
Network Printers List
View and manage all configured network printers in a centralized list. Quickly see printer names, IP addresses, ports, and active status. Toggle printer status with a single click.
Preparation Printer Setup
Configure preparation printers for restaurant kitchen orders. Select "Network printer" as the printer type and choose the network printer device. Assign product categories to route orders to the appropriate kitchen station.
Printer Offline Warning
When open the pos and if network printer is offline, the system shows a clear warning message. So before start using the pos you can make sure the printer is connected and online.
Printer Status in POS
Real-time printer status monitoring in the POS interface. View which printers are online or offline, check the printer service connection status, and see the number of pending print jobs in the queue.
POS Printer Details View
Detailed view of printer configuration in POS interface showing printer IP, port, connection status, and queue information. Access printer menu to view queue and retry failed prints.
Send Print When Printer Offline
Demonstration of the offline queue feature. When a print is sent to an offline printer, it's automatically added to the queue and will be printed when the printer comes back online. No manual intervention required.
Print Failed Error Popup
Clear error messages when printing fails. The system provides detailed information about the failure and automatically adds the failed print to the queue for later retry if the queue feature is enabled.
Print Queue Management
View and manage the offline print queue. See all pending and failed print jobs with timestamps, retry individual prints, or clear the entire queue. The queue automatically retries when printers come back online.
Offline Print Queue Details
Detailed view of queued print jobs showing receipt name, timestamp, status, and retry count. Select multiple items for bulk operations or retry individual prints with a single click.
Failed Receipt Preview
Preview of a failed print job in the queue. Shows the receipt content that failed to print, allowing users to verify the content before retrying. Useful for troubleshooting print issues.
Kitchen Receipt Printed
Example of a kitchen order receipt printed on a network thermal printer. Clear, readable output with order details, product names, quantities, and special instructions for kitchen staff.
Pre-bill Printing
Print pre-bills for customers before payment. Shows order items, quantities, prices, and total amount. Useful for restaurants where customers review the bill before paying.
Final Receipt Printed
Final customer receipt printed on network thermal printer. Includes store information, order details, payment information, and total amount. High-quality output with enhanced image processing.
Session Report Option
Option to print POS session closing reports to network printers. Access from the session closing screen to print detailed sales reports, payment summaries, and transaction details.
Session Report Printed
Example of a POS session report printed on network thermal printer. Includes sales summary, payment method breakdown, opening and closing balances, and transaction count.
Windows Printer Service Client
Standalone Windows service for reliable network printer communication
Printer Service Overview
The printer_service_windows_client is a standalone Windows service that acts as a bridge between Odoo POS and ESC/POS network printers. This service runs on Windows machines where printers are connected (either locally or on the same network), providing secure HTTPS communication, automatic certificate management, and intelligent print queue handling. It is NOT part of the Odoo module but works alongside it to enable network printing functionality.
Important: This printer service must be installed and running on a Windows machine that can access your network printers. It does not need to be installed on the Odoo server.
Printer Service Key Features
Enterprise Security
Private Certificate Authority with 100-year validity. Automatic certificate renewal every 2 years. Zero-maintenance HTTPS with OS-level trust.
Windows Service
Runs as background Windows service with auto-start on boot. Interactive management via service_manager.bat. Full Windows Event Viewer logging.
Advanced Queue Management
Per-printer queues prevent job interruptions. Smart status caching during active printing. Independent worker threads for each printer.
Image Enhancement
Automatic scaling, contrast boost, and sharpness enhancement. Auto-crop white borders. Optimized for 80mm thermal receipt paper.
Auto Certificate Renewal
Scheduled daily checks at 2:00 AM. Automatic renewal 30 days before expiry. Service auto-restarts with new certificate. No client updates needed.
Multiple Printer Support
Support for unlimited network printers. Each printer operates independently. Dedicated queue and worker thread per printer.
Security & Certificate Management
Private Certificate Authority
- 100-Year CA Certificate: Create your own Certificate Authority valid for 100 years
- One-Time Client Setup: Install CA certificate once on all client machines
- OS-Level Trust: Works in all browsers and applications after CA installation
- No Internet Required: Completely offline certificate management
- Automatic Service Certificates: Service certificates auto-renew every 2 years
- Zero Client Updates: Clients never need certificate updates
- Automatic Backups: Old certificates backed up during renewal
- Manual Renewal Option: Force renewal anytime if needed
HTTPS & Authentication
- HTTPS by Default: All communication encrypted with TLS
- CA-Signed Certificates: No browser warnings after CA installation
- Optional API Key: Additional authentication layer available
- CORS Support: Works with web-based POS systems
- Secure Key Storage: Private keys protected with file permissions
- Bearer Token Auth: Standard Authorization header support
- Certificate Validation: Automatic expiry checking and alerts
- Firewall Ready: Easy Windows Firewall configuration
Certificate Lifecycle
Initial Setup (Year 0):
- Generate CA certificate (valid 100 years)
- Generate service certificate (valid 2 years)
- Install CA on all client PCs (ONE TIME)
- Clients trust all future service certificates
Automatic Renewal (Every ~2 Years):
- Scheduled task runs daily at 2:00 AM
- Detects certificate expiring within 30 days
- Backs up old certificate automatically
- Generates new service certificate
- Restarts service with new certificate
- Clients: NO ACTION NEEDED
Print Queue & Job Management
Intelligent Queue System
Per-Printer Queues
- Each printer has its own dedicated queue
- Independent worker thread per printer
- No job interruptions or conflicts
- Jobs processed in FIFO order
Smart Status Checking
- Status cached for 30 seconds to reduce overhead
- No status checks during active printing
- Automatic busy state tracking
- Queue size monitoring and reporting
Job Processing
- 30-Second Timeout: Jobs timeout after 30 seconds
- Unique Job IDs: UUID tracking for each print job
- Position Tracking: Know your place in the queue
- Result Callbacks: Immediate feedback on job status
- Error Handling: Detailed error messages and logging
- Automatic Cleanup: Completed jobs removed from memory
- Thread Safety: Lock-based synchronization
- Graceful Shutdown: Poison pill pattern for worker threads
Image Processing & Enhancement
Advanced Image Enhancement
Automatic Enhancements
- Auto-Crop: Removes white borders automatically
- Scaling: 1.5x enlargement by default for better quality
- Contrast Boost: 20% contrast increase for clarity
- Sharpening: 30% sharpness enhancement for detail
Size Management
- Target Width: 576px default for 80mm receipt paper
- Max Width Constraint: Prevents oversized images
- Aspect Ratio: Maintains original proportions
- LANCZOS Resampling: High-quality image resizing
Configurable Parameters
Global Configuration (Environment Variables):
IMAGE_SCALE_FACTOR- Default: 1.5 (150% size)IMAGE_TARGET_WIDTH- Default: 576px (80mm paper)IMAGE_MAX_WIDTH- Default: 576px (maximum constraint)IMAGE_CONTRAST- Default: 1.2 (20% boost)IMAGE_SHARPNESS- Default: 1.3 (30% sharper)ENABLE_AUTO_CROP- Default: True
Per-Request Customization:
Send custom parameters in each print request JSON to override defaults for specific receipts.
High-Density Printing
- High Density Vertical: Enabled by default for better vertical resolution
- High Density Horizontal: Enabled by default for better horizontal resolution
- BitImageColumn Implementation: Optimized for ESC/POS thermal printers
- Center Alignment: Receipts centered on paper automatically
- Full/Partial Cut: Automatic paper cutting with fallback options
Service Management & Monitoring
Windows Service Features
Service Management
- Install/Uninstall via service_manager.bat
- Start/Stop/Restart commands
- Auto-start on Windows boot
- Manual start mode option
- Service status checking
- Full reinstallation support
Logging & Monitoring
- Windows Event Viewer integration
- Detailed print job logging
- Certificate renewal logs
- Error tracking and debugging
- Service uptime monitoring
- Real-time status API endpoint
Status Monitoring API
GET https://localhost:8080/
Returns comprehensive service status including:
- Service version and uptime
- Network configuration (host, port, protocol)
- Security settings (HTTPS, authentication, certificates)
- Printer configuration (timeout, cache duration)
- Image enhancement settings
- Active printers with queue sizes and busy status
- Environment information (Python version, platform)
Interactive Service Manager
Service Operations
- Install Service
- Start Service
- Stop Service
- Restart Service
- Uninstall Service
- Check Status
- Set Auto-Start
- Set Manual Start
Certificate Management
- Generate Certificates
- Setup Auto-Renewal
- Check Expiry
- Renew Now
- View Renewal Logs
- CA Installation Guide
Other Tools
- View Service Logs
- Configure HTTPS
- Test Connection
- Reinstall Service
- Firewall Configuration
Installation & Setup
System Requirements
- Operating System: Windows 7, 8, 10, or 11
- Python: Version 3.7 or higher
- Network: ESC/POS printer on same network
- Privileges: Administrator rights for installation
- Dependencies: Flask, python-escpos, Pillow, pywin32, cryptography
- Disk Space: ~100MB for service and dependencies
- Network Port: Port 8080 (configurable)
- Firewall: Inbound rule for service port
Quick Setup Steps
- Install Python: Download from python.org and check "Add Python to PATH"
- Install Dependencies: Run install.bat as Administrator
- Generate Certificates: Run service_manager.bat Option 14
- Setup Auto-Renewal: Run service_manager.bat Option 15
- Install Service: Run service_manager.bat Option 1
- Set Auto-Start: Run service_manager.bat Option 7
- Start Service: Run service_manager.bat Option 2
- Install CA on Clients: Run install-ca-windows.bat on each client PC
- Configure Firewall: Allow port 8080 inbound
- Configure Odoo: Set printer service URL in POS settings
Client PC Setup
Each PC that accesses Odoo POS needs the CA certificate installed (ONE TIME only):
- Copy
client/ca-cert.pemandclient/install-ca-windows.batfrom server to client PC - Right-click
install-ca-windows.batand select "Run as Administrator" - See "SUCCESS: Certificate installed!" message
- Restart browser completely (close all windows)
- Access service URL - should show green padlock with no warnings
Important: This is a ONE-TIME setup per client. Once installed, the CA certificate is valid for 100 years and clients never need updates when service certificates renew.
Configuration Options
Environment Variables
| Variable | Default | Description |
|---|---|---|
PRINTER_SERVICE_HOST |
0.0.0.0 | Bind address (0.0.0.0 = all interfaces) |
PRINTER_SERVICE_PORT |
8080 | Service port number |
PRINTER_SERVICE_HTTPS |
True | Enable/disable HTTPS |
PRINTER_SERVICE_DEBUG |
False | Enable debug logging |
PRINTER_TIMEOUT |
10 | Printer connection timeout (seconds) |
PRINTER_API_KEY |
(empty) | Optional API key for authentication |
IMAGE_SCALE_FACTOR |
1.5 | Image scaling multiplier |
IMAGE_TARGET_WIDTH |
576 | Target width in pixels |
IMAGE_MAX_WIDTH |
576 | Maximum width constraint |
IMAGE_CONTRAST |
1.2 | Contrast enhancement factor |
IMAGE_SHARPNESS |
1.3 | Sharpness enhancement factor |
ENABLE_AUTO_CROP |
True | Auto-crop white borders |
Custom Configuration File
Create config.bat:
@echo off REM Network Settings set PRINTER_SERVICE_HOST=0.0.0.0 set PRINTER_SERVICE_PORT=8080 set PRINTER_SERVICE_HTTPS=True REM Security set PRINTER_API_KEY=your_secret_key_here REM Image Enhancement set IMAGE_SCALE_FACTOR=1.5 set IMAGE_CONTRAST=1.2 set IMAGE_SHARPNESS=1.3
Run with: config.bat && service_manager.bat
Printer Service Benefits
Zero Maintenance
- Automatic certificate renewal every 2 years
- No client updates needed for 100 years
- Self-healing service with auto-restart
- Automatic backup of old certificates
- Scheduled daily health checks
Enterprise Security
- Private CA with 100-year validity
- HTTPS encryption for all communication
- Optional API key authentication
- No browser certificate warnings
- Works offline without internet
High Performance
- Per-printer queues prevent conflicts
- Smart status caching reduces overhead
- Independent worker threads
- 30-second job timeout
- Optimized image processing
Easy Management
- Interactive service_manager.bat tool
- One-click install/uninstall
- Real-time status monitoring
- Comprehensive logging
- Simple configuration via environment variables
Multi-Branch Deployment
Centralized Certificate Management
Deploy the printer service across multiple branches with centralized certificate management:
- Generate CA Once: Create the Certificate Authority at headquarters
- Distribute CA Certificate: Install CA on all client PCs across all branches (ONE TIME)
- Generate Branch Certificates: Create service certificates for each branch with their specific IP
- Deploy Service: Copy service folder to each branch with their certificates
- Auto-Renewal Works: Each branch service renews independently
- Zero Client Updates: Clients never need updates when certificates renew
Key Advantage: All branches use the same CA certificate, so clients only need to install it once. When you add new branches or renew certificates, clients require NO updates!
Deployment Scenarios
Same IP Across Branches
- Copy entire service folder to new branch
- Clients already have CA installed
- Configure firewall on new machine
- Start service - works immediately
- Simplest deployment method
Different IPs Per Branch
- Generate certificate with branch IP
- Copy CA folder from headquarters
- Deploy service with new certificate
- Clients need NO updates
- Each branch auto-renews independently
Troubleshooting & Support
Common Issues & Solutions
Service Won't Start
- Check certificates exist in certificates/service/
- Verify port 8080 is not in use
- Run service_manager.bat as Administrator
- Check Event Viewer for error details
- Test manually with run.bat
Certificate Warnings
- CA certificate not installed on client PC
- Run install-ca-windows.bat as Administrator
- Restart browser completely
- Verify with: certutil -store ROOT
- Check for "POS Printer Root CA"
Can't Connect from Odoo
- Verify service is running
- Check firewall allows port 8080
- Test locally: https://localhost:8080
- Install CA on Odoo client machine
- Use correct URL format in POS settings
Printer Not Responding
- Ping printer IP to verify network
- Check printer is powered on
- Verify printer has paper
- Check printer not in error state
- Review service logs for details
Getting Help
When reporting issues, provide the following information:
Diagnostic Commands:
service_manager.bat Option 6- Service statusservice_manager.bat Option 16- Certificate statusservice_manager.bat Option 11- Test connectionservice_manager.bat Option 9- View service logsservice_manager.bat Option 18- View renewal logssysteminfo | findstr /C:"OS Name" /C:"OS Version"- System infopython --version- Python version
Custom Development & Version Support
Need This Module for Different Odoo Version?
We can adapt this module for any Odoo version you need
Want Custom Features or Modifications?
We provide custom development services to enhance or modify this module according to your specific business requirements.
What We Can Do:
- Port to any Odoo version (8.0 to 19.0+)
- Add support for additional printer types
- Custom receipt templates and layouts
- Integration with third-party systems
- Multi-language support enhancements
- Advanced reporting features
- Custom queue management rules
- Printer load balancing
Quick Turnaround:
- Fast development cycles
- Regular progress updates
- Quality assurance testing
- Complete documentation
- Training and support included
- Competitive pricing
- Post-deployment support
- Bug fixes and maintenance
devpybeans@gmail.com
Support & Warranty
90 Days FREE Support Included!
We provide 90 days of completely FREE support after module installation.
Bug Fixes
Free bug fixes and issue resolution for 90 days
Technical Support
Installation help and configuration assistance
Usage Guidance
Best practices and usage recommendations
Support Period: Starts from the date of module installation
Response Time: Within 24-48 hours on business days
Support Channels: Email, Contact Form, and Direct Communication
Contact Information
Ready to enhance your Odoo POS with professional network printing? Get in touch with us!
Website Contact
www.pybeans.com
Contact Form
Developed by PyBeans - Enhancing Odoo for better business solutions.
Please log in to comment on this module