ECR Fiscal Audit Fields
by Terrabit https://www.terrabit.ro , Dorin Hongu https://www.terrabit.roECR Fiscal Audit Fields
Common fiscal printer audit fields shared by POS, invoicing and localizations
Defines, in a single place, the fields that record the result of printing on a fiscal cash register (ECR/AMEF):
- Fiscal receipt (BF)Receipt number within the current Z report; restarts at every Z
- Fiscal document (NR)Fiscal document number, unique per device; the one to use when a document must be identified without ambiguity
- Z reportNumber of the Z report the receipt belongs to
- Fiscal stateOutcome reported by the device driver
- Fiscal errorError message, when the device refused or failed
- Simulated receiptTicked by the drivers on the receipts of a simulated cash register, which are not fiscal documents; compliance modules keep them out of the Z report
The fields are added to journal entries here, and to POS orders by
deltatech_pos, through the abstract mixin deltatech.ecr.fiscal.mixin.
The first five are written by the driver — the POS payment screen, or the store print action, after the Terrabit Connect agent replies — and read by everything downstream: reports, fiscal compliance modules, the Romanian localization.
The module depends on account alone — not on point_of_sale — so the contract can be
consumed from suites that have no access to the cash register driver modules, and from
the POS-free store alternative (deltatech_sale_store) without pulling in Point of Sale.
The fields used to be defined twice, identically: on pos.order in deltatech_pos and on
account.move in deltatech_sale_store. Any module that only needed to read the receipt number
had to depend on one of them, and so on the whole cash register suite.
The contract now lives in a module that depends only on account. The cash register modules
still write the fields; any other module can read them without pulling in the driver.
point_of_sale is not a dependency either: the mixin on pos.order is applied by
deltatech_pos, so deltatech_sale_store, the store alternative without POS, does not need
Point of Sale to reach the fields.
On install, a pre_init_hook takes over the ir_model_data rows of the two former owners, so
updating them does not drop the columns and the fiscal receipt numbers already recorded.
Need help getting started?
Our 800+ apps on the Odoo Apps Store are used in Odoo implementations across Europe, the Americas, Asia and Africa — by companies we have never even met. That is the advantage of building modules that simply work.
Questions about this module? Write to us — the developers who build it will answer.
The module adds no screens of its own: it only provides the fields. They are shown on the invoice
form by the module that prints the receipt from the invoice (deltatech_sale_store). On the POS order
deltatech_pos fills them in without showing them; use Actions → Export to read them.
Simulated receipt (fiscal_simulated) is ticked by the cash register driver when the
receipt was printed on a simulated register: the emulator in Odoo, or Terrabit Connect in simulation mode (the
station shows a Simulation ribbon, see deltatech_tc). Such a receipt is not a fiscal document,
even when its BF, NR and Z numbers are filled in. The POS (deltatech_pos) and the store print action
(deltatech_sale_store) set it; l10n_ro_pos_fiscal_compliance_ecr keeps such receipts out of the Z
report and of the AMEF journal.
To read the fields, export the invoices (Actions → Export) with Fiscal state, Fiscal receipt (BF), Fiscal document (NR), Z report and Simulated receipt:
To write them (a cash register driver), inherit the mixin on your model:
class MyModel(models.Model):
_name = "my.model"
_inherit = ["my.model", "deltatech.ecr.fiscal.mixin"]
To read them, declaring deltatech_ecr_fiscal in depends is enough; the cash register
modules are not needed.
Need help getting started?
Our 800+ apps on the Odoo Apps Store are used in Odoo implementations across Europe, the Americas, Asia and Africa — by companies we have never even met. That is the advantage of building modules that simply work.
Questions about this module? Write to us — the developers who build it will answer.
Prezentare
Definește, într-un singur loc, câmpurile care păstrează rezultatul tipăririi pe o casă de marcat fiscală (ECR/AMEF):
- Bon fiscal (BF)Numărul bonului în raportul Z curent; reîncepe la fiecare Z.
- Document fiscal (NR)Numărul documentului fiscal, unic pe aparat; cel de folosit când un document trebuie identificat fără ambiguitate.
- Raport ZNumărul raportului Z din care face parte bonul.
- Starea fiscalăRezultatul raportat de driverul aparatului.
- Eroare fiscalăMesajul de eroare, când aparatul a refuzat sau a eșuat.
- Bon simulat(Simulated receipt): Bifat de drivere pe bonurile unei case de marcat simulate, care nu sunt documente fiscale; modulele de conformitate le lasă în afara raportului Z.
Câmpurile sunt adăugate aici pe notele contabile și, prin modulul deltatech_pos, pe
comenzile POS, prin mixinul abstract deltatech.ecr.fiscal.mixin.
Primele cinci le scrie driverul (ecranul de plată POS sau acțiunea de tipărire din magazin, după răspunsul agentului Terrabit Connect) și le citesc toate modulele de după: rapoartele, modulele de conformitate fiscală, localizarea românească.
Modulul depinde doar de account, nu de point_of_sale, astfel încât câmpurile pot fi folosite
și de suitele care nu au acces la modulele de casă de marcat, și de alternativa de magazin fără
POS (deltatech_sale_store), fără să atragă Punctul de vânzare.
De ce un modul separat
Câmpurile erau definite de două ori, identic: pe pos.order în deltatech_pos și pe
account.move în deltatech_sale_store. Orice modul care voia doar să citească numărul bonului
trebuia să depindă de unul dintre ele, deci de întreaga suită de casă de marcat.
Contractul stă acum într-un modul care depinde doar de account. Modulele de casă de marcat
rămân cele care scriu câmpurile; oricine altcineva le poate doar citi, fără să atragă
driverul. La instalare, un pre_init_hook preia rândurile din ir_model_data de la cele două
module, ca actualizarea lor să nu ducă la ștergerea coloanelor și a numerelor de bon fiscal deja
înregistrate.
Utilizare
Modulul nu adaugă ecrane proprii: doar pune câmpurile la dispoziție. Pe formularul facturii le
afișează modulul care tipărește bonul din factură (deltatech_sale_store). Pe comanda POS,
deltatech_pos le completează fără să le afișeze; le citiți cu Acțiuni → Export.
Bon simulat (fiscal_simulated) este bifat de driverul casei de marcat când bonul a fost tipărit
pe o casă simulată: emulatorul din Odoo sau Terrabit Connect în mod simulat (stația are panglica
Simulare, vezi deltatech_tc). Un astfel de bon nu este document fiscal, chiar dacă are
completate numerele BF, NR și Z. Îl completează POS-ul (deltatech_pos) și tipărirea din magazin
(deltatech_sale_store); l10n_ro_pos_fiscal_compliance_ecr lasă astfel de bonuri în afara raportului Z
și a jurnalului AMEF.
Ca să scrieți în ele (un driver de casă de marcat), moșteniți mixinul pe modelul dumneavoastră:
class MyModel(models.Model):
_name = "my.model"
_inherit = ["my.model", "deltatech.ecr.fiscal.mixin"]
Ca să le citiți, e suficient să declarați deltatech_ecr_fiscal în depends; modulele de casă
de marcat nu sunt necesare.
Aveți nevoie de ajutor la implementare?
Cele peste 800 de aplicații ale noastre de pe Odoo Apps Store sunt folosite în implementări Odoo din Europa, America, Asia și Africa — de companii pe care nu le-am cunoscut niciodată. Acesta e avantajul modulelor care pur și simplu funcționează.
Aveți întrebări despre modul? Scrieți-ne — vă răspund programatorii care îl dezvoltă.
20.0.1.0.4 (2026-11-15)
- Port of 19.0.1.0.4.
- New field Simulated receipt (
fiscal_simulated): set by the cash register drivers (deltatech_pos,deltatech_sale_store) when the receipt came from a simulated register, and read byl10n_ro_pos_fiscal_compliance_ecr, which keeps it out of the Z report and of the AMEF journal. - Consultant sheet (
readme/FISA_CONSULTANT.md) with the exported fields as screenshot, usage notes on simulated receipts, Romanian translation.
20.0.1.0.3
- Apps Store page: Usage and the context section in English (they were in Romanian), the
Romanian translation in its own tab (
readme/*.ro.md), and an own banner (the cover showed the banner of thedeltatechmodule). Support addresssupport@terrabit.ro.
20.0.1.0.2 (2026-09-29)
- Own module icon, instead of the generic gears it had.
Need help getting started?
Our 800+ apps on the Odoo Apps Store are used in Odoo implementations across Europe, the Americas, Asia and Africa — by companies we have never even met. That is the advantage of building modules that simply work.
Questions about this module? Write to us — the developers who build it will answer.
More apps by Terrabit
Other modules from the same publisher, built to work together. All apps →
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Invoicing (account)
• Discuss (mail) |
| Lines of code | 55 |
| Technical Name |
deltatech_ecr_fiscal |
| License | OPL-1 |
| Website | https://www.terrabit.ro |
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module