Módulo para la declaración de todas las operaciones de venta realizadas por las personas y entidades que desarrollan actividades económicas y tributan en alguno de los territorios históricos del País Vasco/Euskadi.
TicketBAI es un proyecto común de las Haciendas Forales Vascas y del Gobierno Vasco. https://www.euskadi.eus/contenidos/informacion/ticketbai/es_14815/adjuntos/TicketBAI_Especificaciones_v_1_1.pdf
auto_awesome What this module does
AI-generated from the code · Odoo 16.0Send sales invoices and refunds to the Basque tax agency (TicketBAI) directly from Odoo, with automatic XML generation, signing and cancellation, and configure fiscal positions, taxes and company data required by the Basque authorities.
This module connects Odoo's invoicing with the Basque TicketBAI system. When a company enables TicketBAI, every posted customer invoice or refund from a sales journal marked for sending is automatically turned into a TicketBAI record, built and sent to the tax agency. The invoice form shows the TicketBAI invoice, its responses and cancellation records, plus fields for VAT regime keys, refund reason and operation date.
- Companies configure TicketBAI in their settings: enable it, choose the certificate, description method (fixed, manual or automatic from invoice lines), protected data text and the tax agency.
- Fiscal positions carry up to three VAT regime keys and a list of tax exemptions; these are copied to invoices when the fiscal position is selected.
- Taxes are mapped to TicketBAI categories (goods, services, surcharges, exemptions, IRPF) through a tax map, so the XML reports the right tax type and amounts.
- Refund invoices require the original invoice data or a linked reversed invoice; the module blocks posting if the original TicketBAI invoice is missing or already cancelled.
- Once an invoice has been sent, it cannot be reset to draft, and customer invoices cannot be resequenced while TicketBAI is enabled.
- Cancelling an invoice creates a TicketBAI cancellation record; refunds must be cancelled first.
- Journals have a 'Send TicketBAI invoices' option that cannot be switched off if invoices were already sent.
- The module adds menus and screens for TicketBAI invoices, tax maps, VAT regime keys and exemption keys, and a developer info wizard.
Depends on
Required by other modules
Menus it adds
Models and fields (20)
- tbai.info · new modelname (Developer name), software, company_id (Company), developer_id (Developer), tbai_enabled, device_serial_number
- account.tax · extends an existing model
- res.company · extends an existing modeltbai_description (TicketBAI Description), tbai_protected_data (Protected Data), tbai_description_method (TicketBAI Description Method), tbai_protected_data_txt (Substitution Text), tbai_aeat_certificate_id (AEAT Certificate)
- account.move · extends an existing modeltbai_enabled, tbai_invoice_id (TicketBAI Invoice), tbai_refund_key, tbai_invoice_ids (TicketBAI Invoices), tbai_refund_type, tbai_response_ids (Responses), tbai_send_invoice, tbai_date_operation (Operation Date), tbai_vat_regime_key (VAT Regime Key), tbai_cancellation_id (TicketBAI Cancellation), tbai_vat_regime_key2 (VAT Regime 2nd Key), tbai_vat_regime_key3 (VAT Regime 3rd Key), tbai_cancellation_ids (TicketBAI Cancellations), tbai_datetime_invoice, tbai_refund_origin_ids (TicketBAI Refund Origin References), tbai_description_operation (Operation Description), tbai_substitution_invoice_id, tbai_substitute_simplified_invoice (Substitute Simplified Invoice)
- tbai.invoice · extends an existing modelinvoice_id, cancelled_invoice_id
- tbai.tax.map · new modelcode, name, tax_template_ids (Taxes)
- account.journal · extends an existing modeltbai_enabled, tbai_send_invoice (Send TicketBAI invoices to tax agency)
- account.move.line · extends an existing model
- account.fp.tbai.tax · new modeltax_id (Tax), position_id (Fiscal Position), tbai_vat_exemption_key (VAT Exemption Key)
- tbai.vat.regime.key · new modelcode, name
- account.move.reversal · extends an existing model
- account.chart.template · extends an existing model
- tbai.vat.exemption.key · new modelcode, name
- account.fiscal.position · extends an existing modeltbai_vat_regime_key (VAT Regime Key), tbai_vat_regime_key2 (VAT Regime 2nd Key), tbai_vat_regime_key3 (VAT Regime 3rd Key), tbai_vat_exemption_ids
- l10n.es.aeat.certificate · extends an existing modeltbai_p12, tbai_p12_friendlyname (Alias)
- account.resequence.wizard · extends an existing model
- tbai.invoice.refund.origin · new modelnumber, number_prefix, expedition_date, account_refund_invoice_id
- account.fp.tbai.tax_template · new modeltax_id (Tax), position_id (Fiscal Position), tbai_vat_exemption_key (VAT Exemption Key)
- account.fiscal.position.template · extends an existing modeltbai_vat_regime_key (VAT Regime Key), tbai_vat_regime_key2 (VAT Regime 2nd Key), tbai_vat_regime_key3 (VAT Regime 3rd Key), tbai_vat_exemption_ids
- l10n.es.aeat.certificate.password · extends an existing model
Text generated by AI (DeepSeek) from reading the Odoo 16.0 code on GitHub; it may contain mistakes, so check the code before deciding. The module is very large and only part of the code was read. View the code on GitHub
Availability by version
Reviewed: 2026-11-03Confirmation status: 5 confirmed, 4 with no information of 9 versions.
Sources · Odoo 13.0
Confirmed on 2026-11-03 in branch 13.0 of OCA/l10n-spain.
terminal Installation and usage
OCA documentation · Odoo 16.0Configuration
Source · Odoo 16.0Para configurar este módulo es necesario:
En la compañía:
- Ver descripción módulo l10n_es_ticketbai_api
- Certificado AEAT, dar de alta en la configuración de certificados AEAT en facturación
Posición fiscal:
- Claves de regímenes de IVA (se pueden configurar hasta tres)
- Código de exención de IVA para un IVA en particular
Diario
- Permitir cancelación de asientos (habilita el envío del fichero de anulación al cancelar una factura)
- Habilitar/deshabilitar envio de facturas TicketBAI por diarios de ventas
- En caso de que se tengan varias series de facturación, si una de ellas se envía a TicketBAI a través de otro software, en el diario de ventas en el cual se contabilizan estas facturas en Odoo deberá estar desactivado el envío de facturas TicketBAI para evitar duplicar la información en hacienda.
Clientes
- Tipo de identificación fiscal (e.g.: NIF-IVA)
Usage
Source · Odoo 16.0- Factura de cliente
- Se genera el fichero y se firma al validar la factura.
- Factura de cliente rectificativa
- Diferencias (total o parcial)
- Parcial: se genera el fichero y se firma al validar la factura rectificativa. La factura se ha tenido que generar desde el asistente de emitir rectificativa
- Total: se genera el fichero y se firma al crear la rectificativa desde el asistente de emitir rectificativa, escogiendo la opción
cancelar - Anulación de factura
- Se genera un nuevo fichero de anulación y se firma al cancelar una factura validada. La factura se queda en estado cancelado y no puede ser pasada a borrador para volver a validarse.
- Secuencias de diarios (aplicado cuando la compañía habilita TicketBAI)
- Por limitaciones de TicketBAI, se eliminan los sufijos de las secuencias de los diarios de ventas.
- Por legalidad, se obliga a especificar una secuencia dedicada para las facturas rectificativas.
No verified information in OCA: Installation.
Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.