Skip to main content
VeriFactu

What the Generate Export button in VeriFactu España does in Odoo

The Generate Export button builds a JSON file according to the Export Type you choose and, straight afterwards, logs the export in the company's event book. It is always visible on the Export Compliance Records screen; what decides whether you reach that screen is your permissions. Here is what it does for each type, in what order, and what gets recorded.

FlexigoTech · Editor in charge: Víctor Gómez · Updated 5 November 2026

Key facts

Module
VeriFactu
Versions
Odoo 17, 18, 19 and 20
Checked
in the module's source code, version 20.0 · against the sources linked at the end
Reading time
5 min

Where the button is and who can reach it

The wizard opens from the menu Verifactu / SIF › Reports & Exports › Export Wizard. Each menu level asks for permissions, and if you hold none of them you do not see that level:

  • Reports & Exports asks for Auditor (read-only) or SIF Manager.
  • Verifactu / SIF asks for Accountant, Asesoría Operator, Auditor (read-only), Privacy Officer or SIF Manager.
Diagram of the export wizard menu and the Generate Export button
Diagram generated from the module's published code (not an Odoo screenshot): the menu path and the button, in Odoo 17, 18, 19 and 20.

The Generate Export button is in the 17.0, 18.0, 19.0 and 20.0 branches, and in all of them it is always visible, with no state condition. The behaviour described below corresponds to Odoo 20.0. The module is published on Odoo Apps for those four versions (listing).

Diagram of the button text by Odoo language
Diagram generated from the module's published translations (not an Odoo screenshot): with Odoo in Spanish the button is called Generar Exportación; in Catalan, Generar Exportació.

Step by step

  1. Open the wizard from the menu. You will see the Export Compliance Records form, with its fields in the Parameters group.
  2. Check Company. By default it is the active company, and the export runs on whichever company is shown there.
  3. Set Date From and Date To. By default, the first is the first day of the current year and the second is today's date.
  4. Choose Export Type. The default is Libro de Registros de Facturación; the other options are Libro de Eventos, Chain Integrity Report and Full Evidence Pack (Libro + Eventos + Declaración).
  5. Press Generate Export. The module runs the export for the chosen type and keeps the result as a JSON file on the wizard itself.
  6. Next, the module logs an event in the company's event book (explained below).
  7. The form reopens in a pop-up window on the same wizard, with the result already stored.

What each type produces

Export TypeWhat it containsFile name
Libro de Registros de FacturaciónThe company's records whose issue date falls between Date From and Date To (both included), ordered by record number. For each one: serial number, issue date, invoice type, total, hash and status.Starts with libro_registros_ and carries both dates
Libro de EventosThe company's events from Date From onwards, ordered by sequence. For each one: sequence, event type, date and time, description and event hash.Starts with libro_eventos_ and carries both dates
Chain Integrity ReportThe result of verifying the integrity of the company's chain. If the company has no chain yet, the report comes out as passed, with zero records checked and no first break.Starts with chain_integrity_ and carries the company name
Full Evidence Pack (Libro + Eventos + Declaración)The same as the records book.The records book file name

Three details that come from the code:

  • In the event book, Date To does not filter: the filter uses only Date From, and the second date appears only in the file name.
  • The integrity report does not use the dates in its content: it works on the company's chain.
  • In the Odoo 20.0 code, the full pack option runs only the records book export. If you also need the events, generate the Libro de Eventos as well.

The event each export leaves behind

When the export finishes, whichever type it was, the module creates a registry export event for the company. Its description says which type was exported and for which dates, and its context stores the export type and the output format. The event also carries:

  • a sequence number specific to the company;
  • a UTC timestamp;
  • as actor, the user who pressed the button;
  • a SHA-256 hash calculated from the type, the timestamp, the company, the description and the context.

Because the event is created after the file is built, the export from that same click does not include it. You will see it in the next Libro de Eventos whose Date From covers it.

Other events you will see in the book

The button is not the only route that logs events. The module can also create them when nobody presses Generate Export:

  • When a company form is saved: when the AEAT environment changes, when the SIF responsible person changes and when the Verifactu scope changes.
  • When an invoice is cancelled, because the module extends Odoo's standard cancel button.
  • Through the scheduled task Verifactu: Clock Drift Check, which runs every hour and is active from installation.

So a Libro de Eventos can mix export events with others coming from these routes. What the module adds to invoices is covered in this other article.

If something does not come out as expected

  • You cannot find the menu. You are missing one of the permissions for a menu level: check the list at the start.
  • The file comes out as an empty list. In the records book, no record of the chosen company has an issue date inside the range. Check Company, Date From and Date To.
  • The integrity report comes out as passed with zero records checked. That is what the code returns when the company does not yet have a chain.
  • You export the wrong company. The wizard works on the one shown in Company: check that field before pressing the button.

How FlexigoTech can help

FlexigoTech implements Odoo 17, 18, 19 and 20 and builds custom connectors and integrations. If you need to adapt how these files are obtained, or to review who has access to the menu, tell us about your case.

Keep reading

What VeriFactu España adds to the Odoo invoice and when it actsThe fields VeriFactu España adds to the Odoo invoice, when it creates the record on posting and how to check it has acted, step by step.«Only a SIF Manager can retry AEAT submissions.»: when it appears and what to doWhat the VeriFactu message «Only a SIF Manager can retry AEAT submissions.» means in Odoo: when it appears, which buttons trigger it and how to fix it.Run Pre-flight & Create in VeriFactu: a step-by-step checklistChecklist for the Run Pre-flight & Create button in VeriFactu España for Odoo: when it appears, what it checks, what changes and which errors it gives.
Checked in the module's source code (version 20.0) and the linked sources

Sources