DustinMimbela Expert Odoo
Retour à la Boutique d'Apps
Odoo Apps / Website
Website Sale Auto Print
v18
Website Module: website_sale_auto_print

Website Sale Auto Print

Auteur: Dustin Mimbela

Prix du module € 386.59

Documentation Complète du Module

Website Sale Auto Print

This module automatically prints sales orders when customers complete purchases on your Odoo eCommerce website. It integrates seamlessly with thermal printers through IoT Box or direct printing solutions, enabling instant order fulfillment without manual intervention.

Automatic printing of website orders upon confirmation

Compatible with ESC/POS thermal printers and standard printers

Configurable per website with custom printer selection

Key Features
  • Automatic Order Printing: Prints sales orders automatically when customers complete checkout on your website.
  • ESC/POS Receipt Format: Optimized thermal receipt printing with customer details, order lines, and totals.
  • Non-Blocking Operation: Printing errors don't prevent order confirmation - errors are logged for review.
  • Remote Printing Support: Works with Cloudflare Tunnel for secure remote printer access.

Module Configuration Guide

Step 1: Install Required Modules

This module requires the printer_direct module to be installed. Make sure it's installed and configured before proceeding.

Step 2: Configure Printer

Navigate to Settings → Printers and create or configure a printer:

  • Name: A descriptive name (e.g., "Website Orders Printer")
  • Print Format: Select Ticket for thermal receipt printers
  • IoT Box URL: Enter your printer server URL (e.g., https://print.yourdomain.com if using Cloudflare Tunnel, or http://192.168.1.100:8070 for local)
Step 3: Enable Auto-Print for Website

Navigate to Website → Configuration → Settings and configure auto-printing:

  1. Go to the Odoo main menu and click on Website
  2. Click on Configuration → Settings
  3. At the top of the page, select your website from the dropdown (if you have multiple websites)
  4. Scroll down to find the "Auto Print Orders" section
  5. Check the "Auto Print Orders" checkbox to enable automatic printing
  6. In the "Printer" field, click the dropdown and select the printer you configured in Step 2
  7. Click the "Save" button at the top left
Note: The printer dropdown will only show printers that have been configured in Settings → Printers and have the ESCPOS format enabled.

Visual Example:

Website Auto Print Settings

Screenshot showing the Auto Print Orders section in Website Settings. Enable the checkbox and select your configured printer from the dropdown.

Step 4: Test the Configuration

To test if auto-printing is working:

  1. Place a test order on your website
  2. Complete the checkout process
  3. Confirm the order
  4. The order should automatically print on the configured printer
Important Notes
  • If using Cloudflare Tunnel, ensure the tunnel is running before testing
  • Printing errors will not prevent order confirmation - they are logged for review
  • For multi-website setups, configure each website separately with its own printer

How Direct Printing Works

The direct printing process follows these steps:

  1. User Initiates Print: When a user clicks the print button for a report
  2. Server-Side Processing: The server directly communicates with the jIotBox
  3. Print Execution: The jIotBox processes the print job and sends it to the appropriate printer
Performance Benefits

This optimized printing workflow offers several advantages:

  • Reduced Latency: Optimized printing process eliminates unnecessary delays
  • Improved User Experience: Faster printing without interrupting the user's workflow
  • Better Error Handling: Clear notifications and non-blocking error management
  • Optimized Resource Usage: Efficient database queries and network requests reduce server load

Cloudflare Tunnel Setup for Remote Printing

What is Cloudflare Tunnel?

Cloudflare Tunnel allows you to securely expose your local printer server (IoT Box) to the internet without opening ports on your firewall. This enables remote printing from your Odoo server to printers located anywhere in the world.

Prerequisites

If you're using jIotBox, Cloudflared is already included.

Step 1: Authenticate with Cloudflare

Run the following command to authenticate:

cloudflared tunnel login

This will open a browser window where you can log in to your Cloudflare account and authorize the tunnel.

Step 2: Create a Tunnel

Create a new tunnel with a descriptive name:

cloudflared tunnel create your-tunnel-name

Replace your-tunnel-name with a name like printer-tunnel or iotbox-tunnel.

Step 3: Configure DNS Routing

Route a subdomain to your tunnel:

cloudflared tunnel route dns your-tunnel-name print.yourdomain.com

Replace your-tunnel-name with your tunnel name and print.yourdomain.com with your desired subdomain.

Step 4: Run Your Application

Start your jIotBox application. The config.yml file will be created automatically, the tunnel will start automatically, and you'll have remote access at https://print.yourdomain.com

tunnel: <tunnel-id>
credentials-file: /path/to/.cloudflared/<tunnel-id>.json

ingress:
  - hostname: print.yourdomain.com
    service: http://localhost:8070
  - service: http_status:404

Replace <tunnel-id> with your actual tunnel ID (shown when you created the tunnel), print.yourdomain.com with your subdomain, and adjust the port to match your IoT Box or printer server port.

Troubleshooting

If you encounter issues with the direct printing functionality, check the following:

  • jIotBox Connection: Ensure the jIotBox is online and accessible from your client device
  • Printer Status: Verify that the printer is powered on, connected, and has paper
  • Network Configuration: Check firewall settings that might block communication between the client and jIotBox

Besoin d’intégrer du matériel à Odoo POS ?

Développement de modules sur mesure, connexion directe de balances commerciales, imprimantes thermiques (IP/Bluetooth/USB) et flux d’automatisation.