OdooWiki OCA HUB

TicketBAI - API

l10n_es_ticketbai_api folder_open OCA/l10n-spain open_in_new
Accounting & Finance License: AGPL-3

TicketBAI - API

auto_awesome What this module does

AI-generated from the code · Odoo 16.0

This module adds the technical foundation for TicketBAI, the Basque Country e-invoicing system, letting companies configure their certificate, software registration and tax agency so invoices can be signed, given a QR code and sent to the Basque tax authority.

This module is the API layer that prepares Odoo to work with TicketBAI, the Basque Country electronic invoicing requirement. It does not create invoices by itself; it stores the data needed to sign and send them.

In the company settings you can enable TicketBAI, choose a P12 signing certificate, register the software (name, version, license key and developer), pick the tax agency and enter a device serial number. The module checks that a certificate and a tax agency are set when TicketBAI is enabled, and it blocks changing the tax agency once a TicketBAI invoice has already been sent.

It adds a TicketBAI menu under Administration with screens for certificates and installations. On contacts it adds an identification type and identification number used for customers, with length checks.

Behind the scenes it builds the TicketBAI invoice records, computes the TBAI identifier and QR code, prepares the XML and cancellation files, and stores the tax agency responses and their messages. A scheduled job sends pending invoices automatically, retrying when the service is unavailable and marking the chain as error after repeated rejections.

Depends on

basebase_setup

Menus it adds

TicketBAITicketBAI CertificatesTicketBAI Installations
Models and fields (14)
  • res.company · extends an existing modeltbai_enabled (Enable TicketBAI), tbai_license_key (License Key), tbai_developer_id (Developer), tbai_test_enabled (Enable testing), tbai_pro_available (Are Production URLs Available), tbai_software_name (Software Name), tbai_tax_agency_id (TBAI Tax Agency), tbai_certificate_id (Certificate), tbai_test_available (Are Tests URLs Available), tbai_installation_id, tbai_last_invoice_id (Last TicketBAI Invoice sent), tbai_software_version (Software Version), tbai_device_serial_number (Device Serial Number), tbai_vat_regime_simplified (Regime Simplified)
  • res.partner · extends an existing modeltbai_enabled, tbai_partner_idtype (TicketBAI Identification Type Code), tbai_partner_identification_number (TicketBAI Partner Identification Number)
  • tbai.invoice · new modelqr (QR), name, datas, state (Status), number, qr_url (URL), schema, api_url (TicketBAI API URL), file_size, company_id, datas_fname (File Name), description, refund_code (Invoice Refund Reason Code), refund_type, amount_total, tbai_tax_ids (TicketBAI Invoice Taxes), number_prefix, operation_date, vat_regime_key (VAT Regime Key), expedition_date, expedition_hour, signature_value, tbai_identifier (TBAI Identifier), vat_regime_key2 (Second VAT Regime Key), vat_regime_key3 (Third VAT Regime Key), is_invoice_refund, tbai_customer_ids (TicketBAI Invoice Recipients), tbai_response_ids (Responses), simplified_invoice, tbai_invoice_line_ids (TicketBAI Invoice Details)
  • tbai.response · new modelxml (XML Response), state (Status), xml_fname (File Name), tbai_invoice_id, tbai_response_message_ids
  • tbai.tax.agency · new modelname (Tax Agency name), version (TicketBAI version), qr_base_url (QR Base URL), sign_file_url (Sign File URL), sign_file_hash (Sign File HASH), rest_url_invoice (REST API URL for Invoices), test_qr_base_url (Test QR Base URL), rest_url_cancellation (REST API URL for Invoice Cancellations), test_rest_url_invoice (Test - REST API URL for Invoices), tax_agency_version_ids, test_rest_url_cancellation (Test - REST API URL for Invoice Cancellations)
  • tbai.certificate · new modelname, datas (P12 Certificate), password, company_id (Company)
  • tbai.invoice.tax · new modelbase, type, amount (Amount (%)), re_amount (Surcharge Amount (%)), is_exempted, amount_total, is_subject_to (Is Subject to), exempted_cause, re_amount_total (Surcharge Amount Total), tbai_invoice_id, not_exempted_type, not_subject_to_cause (Not Subject to Cause), surcharge_or_simplified_regime (Surcharge or Simplified Regime)
  • tbai.installation · new modelvat (TIN), name (Software Name), version (Software Version), license_key, developer_id (Developer)
  • tbai.invoice.line · new modelquantity, price_unit, description, amount_total, discount_amount, tbai_invoice_id
  • res.config.settings · extends an existing modeltbai_enabled, tbai_device_serial_number (Device Serial Number)
  • tbai.invoice.refund · new modelnumber, number_prefix, expedition_date, tbai_invoice_id
  • tbai.invoice.customer · new modelnif (NIF), zip (ZIP Code), name, idtype (Identification Type Code), address, country_code, tbai_invoice_id, identification_number
  • tbai.response.message · new modelcode, description, tbai_response_id
  • tbai.tax.agency.version · new modeldate_to, version (TicketBAI version), date_from, qr_base_url (QR Base URL), rest_url_invoice (REST API URL for Invoices), test_qr_base_url (Test - QR Base URL), tbai_tax_agency_id, rest_url_cancellation (REST API URL for Invoice Cancellations), test_rest_url_invoice (Test - REST API URL for Invoices), test_rest_url_cancellation (Test - REST API URL for Invoice Cancellations)

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-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation 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

No verified information

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.

info

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.