ErpNet.FP Fiscal Printer for odoo

l10n_bg_erp_net_fp
REPOSITORY
REPOSITORYOCA/l10n-bulgaria
GIT
GIThttps://github.com/OCA/l10n-bulgaria.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-bulgaria/tree/18.0/l10n_bg_erp_net_fp
VERSION
VERSION 7.0.2
CATEGORY
CATEGORYPoint Of Sale
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Rosen Vladimirov
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Rosen Vladimirov
COMMITTERS
COMMITTERSOCA-git-bot, oca-ci, rosenvladimirov
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-bulgaria
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:20
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
    - bus
    - web
    - mail
    - base_setup
    - web_tour
    - html_editor
    - point_of_sale
    - stock_account
    - stock
    - product
    - uom
    - barcodes_gs1_nomenclature
    - barcodes
    - digest
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - resource
    - account
    - onboarding
    - analytic
    - phone_validation
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module extends the functionality of Odoo Point of Sale to support Bulgarian fiscal printers through ErpNet.FP server.

It provides direct browser-to-printer communication for fiscal receipts, eliminating backend bottlenecks while maintaining backend support for administrative operations like Z/X reports and cash operations.

The module automatically maps Bulgarian tax groups (А, Б, В, Г) and handles fiscal receipt printing with automatic fallback to standard printing on errors.

Code Analysis

Views touched (15)
XML IDNameModelTypeStatus
pos_config_view_form_inherit_fiscal_printer pos.config.form.inherit.fiscal.printer pos.config xpath Inherits point_of_sale.pos_config_view_form
res_config_settings_view_form_inherit_fiscal_printer res.config.settings.view.form.inherit.fiscal.printer res.config.settings xpath Inherits point_of_sale.res_config_settings_view_form
view_fiscal_cash_operation_wizard_form fiscal.cash.operation.wizard.form fiscal.cash.operation.wizard form New
view_fiscal_printer_device_form fiscal.printer.device.form fiscal.printer.device form New
view_fiscal_printer_device_search fiscal.printer.device.search fiscal.printer.device search New
view_fiscal_printer_device_tree fiscal.printer.device.tree fiscal.printer.device list New
view_fiscal_printer_response_form fiscal.printer.response.form fiscal.printer.response form New
view_fiscal_printer_response_list fiscal.printer.response.list fiscal.printer.response list New
view_pos_order_search_inherit_fiscal pos.order.search.inherit.fiscal pos.order xpath Inherits point_of_sale.view_pos_order_search
view_pos_order_tree_inherit_fiscal pos.order.tree.inherit.fiscal pos.order xpath Inherits point_of_sale.view_pos_order_tree
view_pos_pos_form_inherit_fiscal_printer pos.order.form.inherit.fiscal.printer pos.order xpath Inherits point_of_sale.view_pos_pos_form
view_pos_printer_form_inherit_erp_net_fp pos.printer.form.erp.net.fp pos.printer xpath Inherits point_of_sale.view_pos_printer_form
view_pos_printer_tree_inherit_erp_net_fp pos.printer.tree.erp.net.fp pos.printer xpath Inherits point_of_sale.view_pos_printer
view_pos_session_form_inherit_fiscal pos.session.form.fiscal pos.session xpath Inherits point_of_sale.view_pos_session_form
view_tax_group_form_inherit_l10n_bg account.tax.group.form.l10n_bg account.tax.group xpath Inherits account.view_tax_group_form
Models touched (11)

New fields (1)
  • l10n_bg_fiscal_tax_group Selection
    default='Б' help='Tax group for a fiscal printer' string='Tax group' args: [('А', 'A - VAT 0%'), ('Б', 'B - VAT 20%'), ('В', 'C - VAT 20%'), ('Г', 'D - VAT 9%')]
Public methods (0)

No public methods.

New fields (4)
  • amount Float
    required=True args: 'Сума'
  • operation_type Selection
    required=True string='Тип операция' args: [('withdraw', 'Служебно изведени'), ('deposit', 'Служебно въведени')]
  • reason Char
    args: 'Причина'
  • session_id Many2one → pos.session
    required=True string='POS Сесия' args: 'pos.session'
Public methods (1)
  • action_execute(self)
    Изпълнява служебната операция

New fields (12)
  • active Boolean
    default=True
  • auto_z_report Boolean
    default=False help='Automatic generation of Z report' args: 'Automatic Z report'
  • connection_mode Selection
    default='direct' help='Direct: Server connects directly to printer\nBrowser Proxy: Browser makes requests and sends results to server' required=True tracking=True args: [('direct', 'Direct (Server can access printer)'), ('proxy', 'Browser Proxy (Printer in local network)')]
  • host Char
    default='http://localhost:8001' required=True
  • last_z_report Datetime
    readonly=True args: 'Last Z report'
  • name Char
    required=True
  • printer_id Char
    required=True args: 'ID on a printer'
  • retry_count Integer
    default=3 help='Number of retries on failure'
  • ssl_verify Boolean
    default=False help='Verify SSL certificates (disable for self-signed certificates)' args: 'Verify SSL'
  • timeout Integer
    default=30 help='Timeout in seconds'
  • z_report_hour Integer
    default=23 help='Time to generate Z report (0-23)' args: 'Z report time'
  • z_report_minute Integer
    default=59 help='Minute to generate Z report (0-59)' args: 'Minute for Z report'
Public methods (18)
  • action_check_connection(self)
    Action за проверка на връзката от UI
  • action_test_x_report(self)
    Тестово действие за X отчет
  • action_test_z_report(self)
    Тестово действие за Z отчет
  • check_printer_available(self)
    Проверява дали принтерът е достъпен Връща dict с информация за статуса
  • get_diagnostic_info(self)
    Диагностична информация
  • get_journal_info(self, from_date=None, to_date=None)
    Информация за КЛЕН :param from_date: начална дата (ISO формат) :param to_date: крайна дата (ISO формат)
  • get_printer_info(self)
    Информация за конкретен принтер
  • get_printer_status(self)
    Статус на принтера
  • get_printers(self)
    Получаване на списък с всички принтери
  • open_cash_drawer(self)
    Отваряне на чекмедже
  • print_deposit(self, amount)
    Служебно въведени :param amount: сума за въвеждане
  • print_duplicate(self)
    Печат на дубликат на последния бон
  • print_reversal_receipt(self, reversal_data)
    Печат на сторно бон :param reversal_data: dict с данни за сторно бона
  • print_withdraw(self, amount)
    Служебно изведени :param amount: сума за извеждане
  • print_x_report(self)
    Печат на X отчет
  • print_z_report(self)
    Печат на Z отчет
  • print_zero_report(self)
    Нулиране на оперативната памет с печат на дневен отчет
  • raw_device_command(self, command)
    Изпращане на директна команда към устройството :param command: командата като string

New fields (5)
  • current_status Char
    compute='_compute_current_status' store=False args: 'Текущ статус'
  • is_ready Boolean
    compute='_compute_current_status' store=False args: 'Готов'
  • status_count Integer
    compute='_compute_status_count' args: 'Брой статуси'
  • status_history_days Integer
    default=30 help='Number of days to keep status history. Older records are automatically deleted.' string='History storage days'
  • status_ids One2many → fiscal.printer.status
    string='Статусна история' args: 'fiscal.printer.status', 'printer_id'
Public methods (4)
  • action_cleanup_old_status(self)
    Ръчно изчистване на старата история от интерфейса
  • action_request_status(self)
    Публичен метод за заявка на статус (извиква се от UI)
  • action_view_status_history(self)
    Отваря списък със статусите на този принтер
  • update_status(self)
    Заявка за обновяване на статуса на принтера Изпраща bus notification към браузъра, който прави реалната заявка

New fields (5)
  • error_message Text
  • printer_id Many2one → fiscal.printer.device
    ondelete='cascade' required=True args: 'fiscal.printer.device', 'Printer'
  • request_id Char
    index=True required=True
  • response_data Text
  • success Boolean
    default=False
Public methods (2)
  • create_from_client(self, request_id, printer_id, success, response_data=None, error_message=None)
    @api.model
    Създава response запис от client-side заявка
  • get_data(self)
    Връща response данните като dict/list

New fields (10)
  • create_date Datetime
    index=True readonly=True args: 'Check time'
  • document_number Char
    args: 'Last document number'
  • error_message Text
    args: 'Error message'
  • firmware_version Char
    args: 'Firmware version'
  • fiscal_memory_available Boolean
    args: 'Fiscal memory available'
  • is_ready Boolean
    index=True args: 'Ready'
  • paper_available Boolean
    args: 'Paper available'
  • printer_id Many2one → fiscal.printer.device
    index=True ondelete='cascade' required=True string='Fiscal printer' args: 'fiscal.printer.device'
  • serial_number Char
    args: 'Serial number'
  • status Char
    index=True
Public methods (0)

No public methods.

New fields (4)
  • l10n_bg_auto_z_on_close Boolean
    default=True help='Automatic printing of Z report on session close' string='Automatic Z report on closing'
  • l10n_bg_erp_net_fp_host Char
    compute='_compute_l10n_bg_erp_net_fp_host' store=True args: 'ErpNet.FP Host'
  • l10n_bg_erp_net_fp_ip Char
    compute='_compute_l10n_bg_erp_net_fp_ip' store=True args: 'ErpNet.FP IP'
  • l10n_bg_fiscal_printer_id Many2one → fiscal.printer.device
    help='Fiscal printer for this POS configuration' string='Fiscal printer' args: 'fiscal.printer.device'
Public methods (0)

No public methods.

New fields (5)
  • l10n_bg_fiscal_memory_number Char
    help='Fiscal memory serial number' readonly=True string='Fiscal memory'
  • l10n_bg_fiscal_receipt_datetime Datetime
    help='The time of issuing the fiscal receipt' readonly=True string='Date/Time of fiscal receipt'
  • l10n_bg_fiscal_receipt_number Char
    help='Fiscal receipt number from ErpNet.FP' readonly=True string='Fiscal number'
  • l10n_bg_is_fiscalized Boolean
    help='Is the order fiscalized?' readonly=True string='Is fiscalized?'
  • l10n_bg_is_reversal Boolean
    help='Is the order reversal?' readonly=True string='Is reversal?'
Public methods (0)

No public methods.

New fields (4)
  • l10n_bg_fiscal_printer_id Many2one → fiscal.printer.device
    domain=[('active', '=', True)] help='Fiscal printer for this POS terminal' string='Fiscal printer' args: 'fiscal.printer.device'
  • l10n_bg_printer_id Char
    related='l10n_bg_fiscal_printer_id.printer_id'
  • l10n_bg_proxy_ip Char
    related='l10n_bg_fiscal_printer_id.host' size=45 store=True
  • printer_type Selection
    selection_add=[('erp_net_fp', 'BG ErpNET FP')]
Public methods (0)

No public methods.

New fields (6)
  • l10n_bg_erp_net_fp_host Char
    compute='_compute_l10n_bg_erp_net_fp_host' store=True args: 'ErpNet.FP Host'
  • l10n_bg_erp_net_fp_ip Char
    compute='_compute_l10n_bg_erp_net_fp_ip' store=True args: 'ErpNet.FP IP'
  • l10n_bg_fiscal_printer_id Many2one → fiscal.printer.device
    readonly=True related='config_id.l10n_bg_fiscal_printer_id' store=True string='Fiscal printer' args: 'fiscal.printer.device'
  • l10n_bg_last_x_report Datetime
    readonly=True args: 'Last X report'
  • l10n_bg_z_report_datetime Datetime
    readonly=True args: 'Z Report Date/Time'
  • l10n_bg_z_report_printed Boolean
    default=False readonly=True args: 'Z report printed'
Public methods (5)
  • action_check_printer(self)
    Проверка на връзката с фискалния принтер
  • action_fiscal_deposit(self)
    Отваря wizard за служебно въведени
  • action_fiscal_withdraw(self)
    Отваря wizard за служебно изведени
  • action_print_x_report(self)
    Отпечатване на X отчет от сесията
  • action_print_z_report(self)
    Отпечатване на Z отчет при затваряне на сесията

New fields (2)
  • l10n_bg_auto_z_on_close Boolean
    readonly=False related='pos_config_id.l10n_bg_auto_z_on_close' string='Automatic Z report'
  • l10n_bg_fiscal_printer_id Many2one
    readonly=False related='pos_config_id.l10n_bg_fiscal_printer_id' string='Fiscal printer'
Public methods (0)

No public methods.