ErpNet.FP Fiscal Printer for odoo
by Rosen Vladimirov https://github.com/rosenvladimirov/l10n-bulgaria , Odoo Community Association (OCA) https://github.com/rosenvladimirov/l10n-bulgaria| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Discuss (mail)
• Invoicing (account) • Point of Sale (point_of_sale) • Inventory (stock) |
| Lines of code | 2943 |
| Technical Name |
l10n_bg_erp_net_fp |
| License | LGPL-3 |
| Website | https://github.com/rosenvladimirov/l10n-bulgaria |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Discuss (mail)
• Invoicing (account) • Point of Sale (point_of_sale) • Inventory (stock) |
| Lines of code | 2943 |
| Technical Name |
l10n_bg_erp_net_fp |
| License | LGPL-3 |
| Website | https://github.com/rosenvladimirov/l10n-bulgaria |
ErpNet.FP Fiscal Printer for Odoo 18
Full integration with Bulgarian fiscal printers through ErpNet.FP server for Odoo 18 Point of Sale.
Key Features:
- ✅ Direct browser-to-printer communication for fiscal receipts (no backend bottleneck)
- ✅ Backend support for administrative operations (Z/X reports, cash operations)
- ✅ Automatic Z-report generation on session closing
- ✅ Real-time printer status monitoring (optional)
- ✅ Bulgarian tax group mapping (А, Б, В, Г)
- ✅ Cash drawer operations (deposit/withdraw)
📋 Features
POS Frontend (JavaScript)
- Fiscal receipt printing - Direct communication from browser to ErpNet.FP server
- Automatic fallback - Falls back to standard printing on error
- Tax group mapping - Automatic mapping of Bulgarian tax groups (А=0%, Б=20%, В=20%, Г=9%)
- Payment type detection - Automatic cash/card detection
- Receipt number tracking - Saves fiscal receipt number and fiscal memory serial
Backend Operations (Python)
- X Reports - Intermediate reports without resetting
- Z Reports - Daily reports with reset (mandatory before closing)
- Automatic Z reports - Scheduled Z reports via cron (configurable time)
- Cash operations - Служебно въведени (Deposit) and Служебно изведени (Withdraw)
- Additional operations - Duplicate receipts, journal info, status monitoring, cash drawer
POS Session Integration
- Session-level operations - X/Z reports and cash operations directly from POS session
- Automatic Z on close - Optional automatic Z report when closing session
- Session validation - Prevents closing without Z report (if configured)
- History tracking - Tracks all fiscal operations in session chatter
⚙️ Configuration
Step 1: ErpNet.FP Server Setup
Install and configure ErpNet.FP server using Docker:
docker run -d \ --name erpnetfp \ -p 8001:8001 \ -v /dev/usb:/dev/usb \ --privileged \ rosenvladimirov/erpnetfp:latest
Or download from: https://github.com/erpnet/ErpNet.FP
Step 2: Configure Fiscal Printer Device
Go to: Point of Sale → Configuration → Fiscal Printers → Devices
- Click Create
- Fill in:
- Name: "Tremol FP-01" (example)
- Host: "http://localhost:8001"
- Printer ID: "FP_12345" (from ErpNet.FP)
- SSL Verify: Disable for self-signed certificates
- Timeout: 30 seconds
- Retry Count: 3
Step 3: Configure Automatic Z Reports (Optional)
- Enable Automatic Z Report
- Set Z Report Hour: 23 (11 PM)
- Set Z Report Minute: 59
Step 4: Configure POS Terminal
Go to: Point of Sale → Configuration → Point of Sale
- Select your POS
- Go to Devices tab
- Set Fiscal Printer: Select the device from Step 2
- Enable Automatic Z Report on Close (recommended)
Step 5: Configure Tax Groups
Go to: Accounting → Configuration → Tax Groups
For each tax group, set Tax Group for Fiscal Printer:
- А = VAT 0%
- Б = VAT 20%
- В = VAT 20% (alternative)
- Г = VAT 9%
🚀 Usage
1. Fiscal Receipt Printing
When completing a sale in POS:
- Add products to cart
- Click Payment
- Select payment method (cash/card)
- Click Validate
- System automatically prints fiscal receipt
2. X Report (Intermediate Report)
During session (no reset):
- Go to: Point of Sale → Dashboard → Sessions
- Open your active session
- Click X Report button
- Report is printed on fiscal printer
3. Z Report (Daily Report with Reset)
Manual Z Report:
- Go to: Point of Sale → Dashboard → Sessions
- Open your session
- Click Z Report button (confirm the dialog)
- Session can now be closed
4. Cash Operations
Служебно въведени (Deposit):
- Open session
- Click Служебно въведени button
- Enter amount and reason
- Click Execute
Служебно изведени (Withdraw):
- Open session
- Click Служебно изведени button
- Enter amount and reason
- Click Execute
🏗️ Technical Details
Architecture - Hybrid Approach
- Receipts → JavaScript → ErpNet.FP (direct, no backend)
- Reports → Python → ErpNet.FP (backend operations)
Why?
- Receipts are high-frequency → Direct communication avoids backend bottleneck
- Reports are low-frequency → Backend provides better error handling and logging
Data Flow - Fiscal Receipt
- POS Frontend prepares receipt data (items, payments, taxes)
- JavaScript sends POST to:
http://erpnetfp:8001/printers/{printerId}/receipt - ErpNet.FP prints on fiscal device
- Returns receipt number and fiscal memory serial
- JavaScript saves to order
- Backend persists on sync
⚠️ Known Issues
- CORS may block requests if ErpNet.FP not on same domain (use HTTPS)
- Self-signed SSL certificates require
ssl_verify=False - Browser console shows fetch errors on printer offline (expected behavior)
🗺️ Roadmap
- Add support for refund receipts (сторно)
- Implement duplicate receipt from POS UI
- Add printer status widget in POS interface
- Support for multiple printers per POS
- Fiscal memory download functionality
- KLEN (journal) report viewer
🐛 Bug Tracker
Bugs are tracked on GitHub Issues.
In case of trouble, please check there if your issue has already been reported.
🔗 Additional Links
- ErpNet.FP Documentation: Wiki
- Dockerized ErpNet.FP: GitHub
- Bulgarian Fiscal Regulations: NAP.bg
👥 Credits
Authors
- Rosen Vladimirov
- Terraros Commerce Ltd.
Contributors
- Rosen Vladimirov <vladimirov.rosen@gmail.com>
Maintainers
This module is maintained by the OCA.
This module is part of the OCA/l10n-bulgaria project on GitHub.
Please log in to comment on this module