pos_receipt_print_default/README.md
2026-05-13 14:47:50 +07:00

20 lines
960 B
Markdown

# POS Receipt Print Default Settings
This module allows you to set the default number of copies and paper size for POS receipts.
## Features
1. **Default Number of Copies**: Configure how many times the receipt should be printed.
2. **Default Paper Size**: Suggest the paper size to the browser print dialog using `@page` CSS rules.
- Supported sizes: 57mm (ISO 57), 58mm, 80mm, 80x210mm, 80x297mm, 112mm, A4.
## How it works
- The module adds configuration fields in **Point of Sale > Configuration > Settings**.
- It patches the `PosStore.printReceipt` method in Javascript to:
- Inject dynamic CSS that overrides the `@page` size.
- Execute a loop to trigger the print function multiple times if more than 1 copy is requested.
## Requirements
- Odoo 19
- Standard browser printing (works best in Chrome/Edge for `@page` support).
- For silent printing (no dialog), the browser must be started in kiosk mode (e.g., `--kiosk-printing` for Chrome).