| REPOSITORY | |
|---|---|
| REPOSITORY | OCA/l10n-spain |
| GIT | |
| GIT | https://github.com/OCA/l10n-spain.git |
| GIT FOLDER | |
| GIT FOLDER | https://github.com/OCA/l10n-spain/tree/16.0/l10n_es_ticketbai_api |
| VERSION | |
| VERSION | 1.1.4 |
| CATEGORY | |
| CATEGORY | Accounting & Finance |
| LICENSE | |
| LICENSE | AGPL-3 |
| APPLICATION | |
| APPLICATION | No |
| AUTO-INSTALLABLE | |
| AUTO-INSTALLABLE | No |
| AUTHORS | |
| AUTHORS | Odoo Community Association (OCA), Binovo |
| MAINTAINERS | |
| MAINTAINERS | Odoo Community Association (OCA), Binovo |
| COMMITTERS | |
| COMMITTERS | Pedro M. Baeza, Weblate, OCA-git-bot, oca-ci, Aritz Olea, Andrii9090-tecnativa, luciaavanzosc, r.perez |
| WEBSITE | |
| WEBSITE | https://github.com/OCA/l10n-spain |
| LAST TRACKING UPDATE | |
| LAST TRACKING UPDATE | 2026-07-06 00:53:40 |
| ODOO DEPENDENCIES | |
| ODOO DEPENDENCIES |
odoo/odoo: - base - base_setup - web |
| PYTHON DEPENDENCIES | |
| PYTHON DEPENDENCIES |
qrcode xmlsig xmltodict |
| SYSTEM DEPENDENCIES | |
| SYSTEM DEPENDENCIES | Not have |
| DESCRIPTION | |
| DESCRIPTION | |
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
res_config_settings_view_form_inherit_l10n_es_ticketbai_api |
res.config.settings.view.form.inherit.base.setup.inherit.ticketbai_api | res.config.settings | xpath | Inherits base_setup.res_config_settings_view_form |
tbai_certificate_form_view |
tbai.certificate.view.form | tbai.certificate | form | New |
tbai_certificate_search_view |
tbai.certificate.view.search | tbai.certificate | search | New |
tbai_certificate_tree_view |
tbai.certificate.view.tree | tbai.certificate | tree | New |
tbai_installation_form_view |
tbai.installation.view.form | tbai.installation | form | New |
tbai_installation_search_view |
tbai.installation.view.search | tbai.installation | search | New |
tbai_installation_tree_view |
tbai.installation.view.tree | tbai.installation | tree | New |
view_company_form_inherit |
res.company.form.inherit | res.company | xpath | Inherits base.view_company_form |
tbai_certificate_id
Many2one → tbai.certificate
comodel_name='tbai.certificate'
copy=False
domain="[('company_id', '=', id)]"
string='Certificate'
tbai_developer_id
Many2one → res.partner
comodel_name='res.partner'
readonly=True
related='tbai_installation_id.developer_id'
string='Developer'
tbai_device_serial_number
Char
copy=False
default=''
args: 'Device Serial Number'
tbai_enabled
Boolean
copy=False
args: 'Enable TicketBAI'
tbai_installation_id
Many2one → tbai.installation
comodel_name='tbai.installation'
copy=False
tbai_last_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
copy=False
string='Last TicketBAI Invoice sent'
tbai_license_key
Char
readonly=True
related='tbai_installation_id.license_key'
args: 'License Key'
tbai_pro_available
Boolean
copy=False
args: 'Are Production URLs Available'
tbai_software_name
Char
help='Registered name at the Tax Agency.'
readonly=True
related='tbai_installation_id.name'
string='Software Name'
tbai_software_version
Char
copy=False
help='Version of the software.'
related='tbai_installation_id.version'
string='Software Version'
tbai_tax_agency_id
Many2one → tbai.tax.agency
comodel_name='tbai.tax.agency'
copy=False
string='TBAI Tax Agency'
tbai_test_available
Boolean
copy=False
args: 'Are Tests URLs Available'
tbai_test_enabled
Boolean
copy=False
args: 'Enable testing'
tbai_vat_regime_simplified
Boolean
copy=False
args: 'Regime Simplified'
is_operation_in_surcharge_equivalence_or_simplified_regime(self)
onchange_tbai_enabled(self)
onchange_tbai_tax_agency(self)
tbai_build_software(self)
tbai_certificate_get_p12(self)
tbai_certificate_get_p12_buffer(self)
tbai_certificate_get_p12_password(self)
tbai_device_serial_number
Char
readonly=False
related='company_id.tbai_device_serial_number'
string='Device Serial Number'
tbai_enabled
Boolean
readonly=True
related='company_id.tbai_enabled'
No public methods.
tbai_enabled
Boolean
compute='_compute_tbai_enabled'
tbai_partner_identification_number
Char
default=''
help='Used when the identification type code is not VAT identification number.'
args: 'TicketBAI Partner Identification Number'
tbai_partner_idtype
Selection
default=TicketBaiCustomerIdType.T02.value
selection=[(TicketBaiCustomerIdType.T02.value, 'VAT identification number'), (TicketBaiCustomerIdType.T03.value, 'Passport'), (TicketBaiCustomerIdType.T04.value, 'Official identification document issued by the country or territory of residence'), (TicketBaiCustomerIdType.T05.value, 'Residence certificate'), (TicketBaiCustomerIdType.T06.value, 'Other document')]
string='TicketBAI Identification Type Code'
tbai_get_partner_country_code(self)
tbai_get_partner_vat_number(self)
tbai_get_value_apellidos_nombre_razon_social(self)
tbai_get_value_direccion(self)
tbai_get_value_nif(self)
company_id
Many2one → res.company
comodel_name='res.company'
default=<expr>
required=True
string='Company'
datas
Binary
attachment=True
required=True
args: 'P12 Certificate'
name
Char
required=True
password
Char
default=''
get_p12(self)
get_p12_buffer(self)
developer_id
Many2one → res.partner
comodel_name='res.partner'
copy=False
required=True
string='Developer'
license_key
Char
copy=False
required=True
name
Char
copy=False
help='Registered name at the Tax Agency.'
required=True
string='Software Name'
vat
Char
related='developer_id.vat'
args: 'TIN'
version
Char
copy=False
help='Version of the software.'
required=True
string='Software Version'
No public methods.
amount_total
Char
default=''
api_url
Char
compute='_compute_api_url'
args: 'TicketBAI API URL'
company_id
Many2one → res.company
comodel_name='res.company'
required=True
datas
Binary
attachment=True
copy=False
datas_fname
Char
copy=False
args: 'File Name'
description
Char
default='/'
expedition_date
Char
required=True
expedition_hour
Char
default=''
file_size
Integer
copy=False
is_invoice_refund
Boolean
help='TicketBAI Invoice is a refund (Substitution or Differences).'
name
Char
required=True
number
Char
required=True
number_prefix
Char
default=''
operation_date
Char
default=''
previous_tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
copy=False
qr
Binary
attachment=True
compute='_compute_tbai_qr'
copy=False
store=True
string='QR'
qr_url
Char
compute='_compute_tbai_qr'
copy=False
store=True
args: 'URL'
refund_code
Selection
help='BOE-A-1992-28740. Ley 37/1992, de 28 de diciembre, del Impuesto sobre el Valor Añadido. Artículo 80. Modificación de la base imponible.'
selection=[(RefundCode.R1.value, 'Art. 80.1, 80.2, 80.6 and rights founded error'), (RefundCode.R2.value, 'Art. 80.3'), (RefundCode.R3.value, 'Art. 80.4'), (RefundCode.R4.value, 'Art. 80 - other'), (RefundCode.R5.value, 'Simplified Invoice')]
string='Invoice Refund Reason Code'
refund_type
Selection
help='Refund Invoice Type (S/Substitution or I/Differences).'
selection=[(RefundType.substitution.value, 'S'), (RefundType.differences.value, 'I')]
schema
Selection
help='\n * TicketBai: Invoice\n * AnulaTicketBai: Invoice Cancellation\n '
required=True
selection=[(TicketBaiSchema.TicketBai.value, 'TicketBai'), (TicketBaiSchema.AnulaTicketBai.value, 'AnulaTicketBai')]
signature_value
Char
copy=False
default=''
simplified_invoice
Selection
help='S/Yes or N/No'
selection=[(SiNoType.S.value, 'S'), (SiNoType.N.value, 'N')]
state
Selection
copy=False
default=TicketBaiInvoiceState.draft.value
index=True
required=True
selection=[(TicketBaiInvoiceState.draft.value, 'Draft'), (TicketBaiInvoiceState.pending.value, 'Pending'), (TicketBaiInvoiceState.sent.value, 'Sent'), (TicketBaiInvoiceState.cancel.value, 'Cancelled'), (TicketBaiInvoiceState.error.value, 'Error')]
string='Status'
substituted_invoice_amount_total_untaxed
Char
default=''
help='\n Original Invoice Total Amount without Taxes. E.g.:\n - Amount Total: 121.0 €\n - Tax Amount: 21 %\n - Total Tax Amount: 21 €\n * Amount Total Untaxed: 100 €\n '
substituted_invoice_total_tax_amount
Char
default=''
help='\n Original Invoice Total Tax Amount. E.g.:\n - Amount Total: 121.0 €\n - Tax Amount: 21 %\n * Total Tax Amount: 21 €\n '
substitutes_simplified_invoice
Selection
help='S/Yes or N/No'
selection=[(SiNoType.S.value, 'S'), (SiNoType.N.value, 'N')]
tax_retention_amount_total
Char
default=''
args: 'Invoice Tax Retention Total Amount'
tbai_customer_ids
One2many → tbai.invoice.customer
comodel_name='tbai.invoice.customer'
copy=True
inverse_name='tbai_invoice_id'
string='TicketBAI Invoice Recipients'
tbai_identifier
Char
compute='_compute_tbai_identifier'
copy=False
store=True
args: 'TBAI Identifier'
tbai_invoice_line_ids
One2many → tbai.invoice.line
comodel_name='tbai.invoice.line'
copy=True
inverse_name='tbai_invoice_id'
string='TicketBAI Invoice Details'
tbai_invoice_refund_ids
One2many → tbai.invoice.refund
comodel_name='tbai.invoice.refund'
copy=True
inverse_name='tbai_invoice_id'
string='Refunded Invoices'
tbai_response_ids
One2many → tbai.response
comodel_name='tbai.response'
inverse_name='tbai_invoice_id'
string='Responses'
tbai_tax_ids
One2many → tbai.invoice.tax
comodel_name='tbai.invoice.tax'
copy=True
inverse_name='tbai_invoice_id'
string='TicketBAI Invoice Taxes'
vat_regime_key
Char
default=''
args: 'VAT Regime Key'
vat_regime_key2
Char
default=''
args: 'Second VAT Regime Key'
vat_regime_key3
Char
default=''
args: 'Third VAT Regime Key'
build_cabecera(self)
build_cabecera_factura(self)
build_cancellation(self)
build_claves(self)
build_datos_factura(self)
build_destinatarios(self)
build_detalle_exenta(self)
build_detalle_no_exenta(self)
build_detalle_no_sujeta(self)
build_detalles_factura(self)
build_emisor(self)
build_encadenamiento_factura_anterior(self)
build_entrega(self)
build_exenta(self)
build_factura(self)
build_factura_rectificativa(self)
build_facturas_rectificadas_sustituidas(self)
build_huella_tbai(self)
build_id_detalle_factura(self)
build_id_factura(self)
build_importe_rectificacion_sustitutiva(self)
build_invoice(self)
build_no_exenta(self)
build_no_sujeta(self)
build_prestacion_servicios(self)
build_sujeta(self)
build_sujetos(self)
build_tbai_invoice(self)
build_tipo_desglose(self)
cancel(self)
error(self)
get_exempted_taxes(self)
get_next_pending_invoice(self, company_id=False, limit=1)
get_not_exempted_taxes(self)
get_not_subject_to_taxes(self)
get_subject_to_taxes(self)
get_taxes(self)
get_tbai_xml_signed_and_signature_value(self)
get_tbai_xml_unsigned(self)
get_ticketbai_api(self, **kwargs)
mark_as_pending(self)
mark_as_sent(self)
mark_chain_as_error(self, invoice_to_error)
send(self, **kwargs)
send_pending_invoices(self)
address
Char
default=''
country_code
Char
required=True
identification_number
Char
default=''
help='Required Identification Number for non spanish customers.'
idtype
Selection
default=TicketBaiCustomerIdType.T02.value
help='Required for non spanish customers.'
selection=[(TicketBaiCustomerIdType.T02.value, 'VAT identification number'), (TicketBaiCustomerIdType.T03.value, 'Passport'), (TicketBaiCustomerIdType.T04.value, 'Official identification document issued by the country or territory of residence'), (TicketBaiCustomerIdType.T05.value, 'Residence certificate'), (TicketBaiCustomerIdType.T06.value, 'Other document')]
string='Identification Type Code'
name
Char
help='Name and surname, or business name.'
required=True
nif
Char
default=''
help='Spanish Fiscal Identification Number'
args: 'NIF'
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
zip
Char
default=''
args: 'ZIP Code'
No public methods.
amount_total
Char
help='String of float with 12 digits and 2 decimal points.'
required=True
description
Char
required=True
discount_amount
Char
default='0.00'
help='String of float with 12 digits and 2 decimal points.'
price_unit
Char
help='String of float with 12 digits and 8 decimal points.'
required=True
quantity
Char
help='String of float with 12 digits and 2 decimal points.'
required=True
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
No public methods.
expedition_date
Char
required=True
number
Char
required=True
number_prefix
Char
default=''
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
No public methods.
amount
Char
default=''
help='String of float with 3 digits and 2 decimal points.'
args: 'Amount (%)'
amount_total
Char
default=''
help='String of float with 12 digits and 2 decimal points.'
base
Char
default=''
help='String of float with 12 digits and 3 decimal points.'
exempted_cause
Selection
help='\n E1: Exenta por el artículo 20 de la Norma Foral del IVA.\n E2: Exenta por el artículo 21 de la Norma Foral del IVA.\n E3: Exenta por el artículo 22 de la Norma Foral del IVA.\n E4: Exenta por el artículo 23 y 24 de la Norma Foral del IVA.\n E5: Exenta por el artículo 25 de la Norma Foral del IVA.\n E6: Exenta por otra causa.\n '
selection=[(ExemptedCause.E1.value, 'E1'), (ExemptedCause.E2.value, 'E2'), (ExemptedCause.E3.value, 'E3'), (ExemptedCause.E4.value, 'E4'), (ExemptedCause.E5.value, 'E5'), (ExemptedCause.E6.value, 'E6')]
is_exempted
Boolean
is_subject_to
Boolean
not_exempted_type
Selection
help='\n S1: Sin inversión del sujeto pasivo.\n S2: Con inversión del sujeto pasivo.\n '
selection=[(NotExemptedType.S1.value, 'S1'), (NotExemptedType.S2.value, 'S2')]
not_subject_to_cause
Selection
help='\n OT:\n - No sujeto por el artículo 7 de la Norma Foral de IVA Otros supuestos de no\n sujeción.\n RL:\n - No sujeto por reglas de localización.\n '
selection=[(NotSubjectToCause.OT.value, 'OT'), (NotSubjectToCause.RL.value, 'RL')]
string='Not Subject to Cause'
re_amount
Char
default=''
help='String of float with 3 digits and 2 decimal points.'
args: 'Surcharge Amount (%)'
re_amount_total
Char
default=''
help='String of float with 12 digits and 2 decimal points.'
args: 'Surcharge Amount Total'
surcharge_or_simplified_regime
Selection
default=SurchargeOrSimplifiedRegimeType.N.value
selection=[(SurchargeOrSimplifiedRegimeType.N.value, 'N'), (SurchargeOrSimplifiedRegimeType.S.value, 'S')]
string='Surcharge or Simplified Regime'
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
type
Selection
selection=[(TicketBaiTaxType.service.value, 'Service'), (TicketBaiTaxType.provision_of_goods.value, 'Provision of goods')]
No public methods.
state
Selection
required=True
selection=[(TicketBaiResponseState.RECEIVED.value, 'Received'), (TicketBaiResponseState.REJECTED.value, 'Rejected'), (TicketBaiResponseState.REQUEST_ERROR.value, 'Request error'), (TicketBaiResponseState.BUILD_ERROR.value, 'Build error')]
string='Status'
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
tbai_response_message_ids
One2many → tbai.response.message
comodel_name='tbai.response.message'
inverse_name='tbai_response_id'
xml
Binary
attachment=True
string='XML Response'
xml_fname
Char
prepare_tbai_api_error_values(self, msg)
prepare_tbai_response_values(self, response)
code
Char
required=True
description
Char
required=True
translate=True
tbai_response_id
Many2one → tbai.response
comodel_name='tbai.response'
ondelete='cascade'
required=True
create(self, vals_list)
name_get(self)
name
Char
required=True
string='Tax Agency name'
qr_base_url
Char
compute='_compute_ticketbai_version'
store=True
string='QR Base URL'
rest_url_cancellation
Char
compute='_compute_ticketbai_version'
store=True
string='REST API URL for Invoice Cancellations'
rest_url_invoice
Char
compute='_compute_ticketbai_version'
store=True
string='REST API URL for Invoices'
sign_file_hash
Char
required=True
string='Sign File HASH'
sign_file_url
Char
required=True
string='Sign File URL'
tax_agency_version_ids
One2many → tbai.tax.agency.version
comodel_name='tbai.tax.agency.version'
inverse_name='tbai_tax_agency_id'
test_qr_base_url
Char
compute='_compute_ticketbai_version'
store=True
string='Test QR Base URL'
test_rest_url_cancellation
Char
compute='_compute_ticketbai_version'
store=True
string='Test - REST API URL for Invoice Cancellations'
test_rest_url_invoice
Char
compute='_compute_ticketbai_version'
store=True
string='Test - REST API URL for Invoices'
version
Char
compute='_compute_ticketbai_version'
store=True
string='TicketBAI version'
get_current_version(self)
date_from
Date
date_to
Date
qr_base_url
Char
required=True
string='QR Base URL'
rest_url_cancellation
Char
string='REST API URL for Invoice Cancellations'
rest_url_invoice
Char
string='REST API URL for Invoices'
tbai_tax_agency_id
Many2one → tbai.tax.agency
comodel_name='tbai.tax.agency'
ondelete='restrict'
required=True
test_qr_base_url
Char
string='Test - QR Base URL'
test_rest_url_cancellation
Char
string='Test - REST API URL for Invoice Cancellations'
test_rest_url_invoice
Char
string='Test - REST API URL for Invoices'
version
Char
required=True
string='TicketBAI version'
No public methods.
| REPOSITORY | |
|---|---|
| REPOSITORY | OCA/l10n-spain |
| GIT | |
| GIT | https://github.com/OCA/l10n-spain.git |
| GIT FOLDER | |
| GIT FOLDER | https://github.com/OCA/l10n-spain/tree/15.0/l10n_es_ticketbai_api |
| VERSION | |
| VERSION | 1.1.4 |
| CATEGORY | |
| CATEGORY | Accounting & Finance |
| LICENSE | |
| LICENSE | AGPL-3 |
| APPLICATION | |
| APPLICATION | No |
| AUTO-INSTALLABLE | |
| AUTO-INSTALLABLE | No |
| AUTHORS | |
| AUTHORS | Odoo Community Association (OCA), Binovo |
| MAINTAINERS | |
| MAINTAINERS | Odoo Community Association (OCA), Binovo |
| COMMITTERS | |
| COMMITTERS | Pedro M. Baeza, Jairo Llopis, Enric Tobella, OCA Transbot, Weblate, OCA-git-bot, oca-ci, Aritz Olea |
| WEBSITE | |
| WEBSITE | https://github.com/OCA/l10n-spain |
| LAST TRACKING UPDATE | |
| LAST TRACKING UPDATE | 2026-07-06 00:46:29 |
| ODOO DEPENDENCIES | |
| ODOO DEPENDENCIES |
odoo/odoo: - base - base_setup - web |
| PYTHON DEPENDENCIES | |
| PYTHON DEPENDENCIES |
cryptography qrcode xmlsig xmltodict |
| SYSTEM DEPENDENCIES | |
| SYSTEM DEPENDENCIES | Not have |
| DESCRIPTION | |
| DESCRIPTION | |
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
res_config_settings_view_form_inherit_l10n_es_ticketbai_api |
res.config.settings.view.form.inherit.base.setup.inherit.ticketbai_api | res.config.settings | xpath | Inherits base_setup.res_config_settings_view_form |
tbai_certificate_form_view |
tbai.certificate.view.form | tbai.certificate | form | New |
tbai_certificate_search_view |
tbai.certificate.view.search | tbai.certificate | search | New |
tbai_certificate_tree_view |
tbai.certificate.view.tree | tbai.certificate | tree | New |
tbai_installation_form_view |
tbai.installation.view.form | tbai.installation | form | New |
tbai_installation_search_view |
tbai.installation.view.search | tbai.installation | search | New |
tbai_installation_tree_view |
tbai.installation.view.tree | tbai.installation | tree | New |
view_company_form_inherit |
res.company.form.inherit | res.company | xpath | Inherits base.view_company_form |
tbai_certificate_id
Many2one → tbai.certificate
comodel_name='tbai.certificate'
copy=False
domain="[('company_id', '=', id)]"
string='Certificate'
tbai_developer_id
Many2one → res.partner
comodel_name='res.partner'
readonly=True
related='tbai_installation_id.developer_id'
string='Developer'
tbai_device_serial_number
Char
copy=False
default=''
args: 'Device Serial Number'
tbai_enabled
Boolean
copy=False
args: 'Enable TicketBAI'
tbai_installation_id
Many2one → tbai.installation
comodel_name='tbai.installation'
copy=False
tbai_last_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
copy=False
string='Last TicketBAI Invoice sent'
tbai_license_key
Char
readonly=True
related='tbai_installation_id.license_key'
args: 'License Key'
tbai_pro_available
Boolean
copy=False
args: 'Are Production URLs Available'
tbai_software_name
Char
help='Registered name at the Tax Agency.'
readonly=True
related='tbai_installation_id.name'
string='Software Name'
tbai_software_version
Char
copy=False
help='Version of the software.'
related='tbai_installation_id.version'
string='Software Version'
tbai_tax_agency_id
Many2one → tbai.tax.agency
comodel_name='tbai.tax.agency'
copy=False
string='TBAI Tax Agency'
tbai_test_available
Boolean
copy=False
args: 'Are Tests URLs Available'
tbai_test_enabled
Boolean
copy=False
args: 'Enable testing'
tbai_vat_regime_simplified
Boolean
copy=False
args: 'Regime Simplified'
onchange_tbai_enabled(self)
onchange_tbai_tax_agency(self)
tbai_build_software(self)
tbai_certificate_get_p12(self)
tbai_certificate_get_p12_buffer(self)
tbai_certificate_get_p12_password(self)
tbai_device_serial_number
Char
readonly=False
related='company_id.tbai_device_serial_number'
string='Device Serial Number'
tbai_enabled
Boolean
readonly=True
related='company_id.tbai_enabled'
No public methods.
tbai_enabled
Boolean
compute='_compute_tbai_enabled'
tbai_partner_identification_number
Char
default=''
help='Used when the identification type code is not VAT identification number.'
args: 'TicketBAI Partner Identification Number'
tbai_partner_idtype
Selection
default=TicketBaiCustomerIdType.T02.value
selection=[(TicketBaiCustomerIdType.T02.value, 'VAT identification number'), (TicketBaiCustomerIdType.T03.value, 'Passport'), (TicketBaiCustomerIdType.T04.value, 'Official identification document issued by the country or territory of residence'), (TicketBaiCustomerIdType.T05.value, 'Residence certificate'), (TicketBaiCustomerIdType.T06.value, 'Other document')]
string='TicketBAI Identification Type Code'
tbai_get_partner_country_code(self)
tbai_get_partner_vat_number(self)
tbai_get_value_apellidos_nombre_razon_social(self)
tbai_get_value_direccion(self)
tbai_get_value_nif(self)
company_id
Many2one → res.company
comodel_name='res.company'
default=<expr>
required=True
string='Company'
datas
Binary
attachment=True
required=True
args: 'P12 Certificate'
name
Char
required=True
password
Char
default=''
get_p12(self)
get_p12_buffer(self)
developer_id
Many2one → res.partner
comodel_name='res.partner'
copy=False
required=True
string='Developer'
license_key
Char
copy=False
required=True
name
Char
copy=False
help='Registered name at the Tax Agency.'
required=True
string='Software Name'
vat
Char
related='developer_id.vat'
args: 'TIN'
version
Char
copy=False
help='Version of the software.'
required=True
string='Software Version'
No public methods.
amount_total
Char
default=''
api_url
Char
compute='_compute_api_url'
args: 'TicketBAI API URL'
company_id
Many2one → res.company
comodel_name='res.company'
required=True
datas
Binary
attachment=True
copy=False
datas_fname
Char
copy=False
args: 'File Name'
description
Char
default='/'
expedition_date
Char
required=True
expedition_hour
Char
default=''
file_size
Integer
copy=False
is_invoice_refund
Boolean
help='TicketBAI Invoice is a refund (Substitution or Differences).'
name
Char
required=True
number
Char
required=True
number_prefix
Char
default=''
operation_date
Char
default=''
previous_tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
copy=False
qr
Binary
attachment=True
compute='_compute_tbai_qr'
copy=False
store=True
string='QR'
qr_url
Char
compute='_compute_tbai_qr'
copy=False
store=True
args: 'URL'
refund_code
Selection
help='BOE-A-1992-28740. Ley 37/1992, de 28 de diciembre, del Impuesto sobre el Valor Añadido. Artículo 80. Modificación de la base imponible.'
selection=[(RefundCode.R1.value, 'Art. 80.1, 80.2, 80.6 and rights founded error'), (RefundCode.R2.value, 'Art. 80.3'), (RefundCode.R3.value, 'Art. 80.4'), (RefundCode.R4.value, 'Art. 80 - other'), (RefundCode.R5.value, 'Simplified Invoice')]
string='Invoice Refund Reason Code'
refund_type
Selection
help='Refund Invoice Type (S/Substitution or I/Differences).'
selection=[(RefundType.substitution.value, 'S'), (RefundType.differences.value, 'I')]
schema
Selection
help='\n * TicketBai: Invoice\n * AnulaTicketBai: Invoice Cancellation\n '
required=True
selection=[(TicketBaiSchema.TicketBai.value, 'TicketBai'), (TicketBaiSchema.AnulaTicketBai.value, 'AnulaTicketBai')]
signature_value
Char
copy=False
default=''
simplified_invoice
Selection
help='S/Yes or N/No'
selection=[(SiNoType.S.value, 'S'), (SiNoType.N.value, 'N')]
state
Selection
copy=False
default=TicketBaiInvoiceState.draft.value
index=True
required=True
selection=[(TicketBaiInvoiceState.draft.value, 'Draft'), (TicketBaiInvoiceState.pending.value, 'Pending'), (TicketBaiInvoiceState.sent.value, 'Sent'), (TicketBaiInvoiceState.cancel.value, 'Cancelled'), (TicketBaiInvoiceState.error.value, 'Error')]
string='Status'
substituted_invoice_amount_total_untaxed
Char
default=''
help='\n Original Invoice Total Amount without Taxes. E.g.:\n - Amount Total: 121.0 €\n - Tax Amount: 21 %\n - Total Tax Amount: 21 €\n * Amount Total Untaxed: 100 €\n '
substituted_invoice_total_tax_amount
Char
default=''
help='\n Original Invoice Total Tax Amount. E.g.:\n - Amount Total: 121.0 €\n - Tax Amount: 21 %\n * Total Tax Amount: 21 €\n '
substitutes_simplified_invoice
Selection
help='S/Yes or N/No'
selection=[(SiNoType.S.value, 'S'), (SiNoType.N.value, 'N')]
tax_retention_amount_total
Char
default=''
args: 'Invoice Tax Retention Total Amount'
tbai_customer_ids
One2many → tbai.invoice.customer
comodel_name='tbai.invoice.customer'
copy=True
inverse_name='tbai_invoice_id'
string='TicketBAI Invoice Recipients'
tbai_identifier
Char
compute='_compute_tbai_identifier'
copy=False
store=True
args: 'TBAI Identifier'
tbai_invoice_line_ids
One2many → tbai.invoice.line
comodel_name='tbai.invoice.line'
copy=True
inverse_name='tbai_invoice_id'
string='TicketBAI Invoice Details'
tbai_invoice_refund_ids
One2many → tbai.invoice.refund
comodel_name='tbai.invoice.refund'
copy=True
inverse_name='tbai_invoice_id'
string='Refunded Invoices'
tbai_response_ids
One2many → tbai.response
comodel_name='tbai.response'
inverse_name='tbai_invoice_id'
string='Responses'
tbai_tax_ids
One2many → tbai.invoice.tax
comodel_name='tbai.invoice.tax'
copy=True
inverse_name='tbai_invoice_id'
string='TicketBAI Invoice Taxes'
vat_regime_key
Char
default=''
args: 'VAT Regime Key'
vat_regime_key2
Char
default=''
args: 'Second VAT Regime Key'
vat_regime_key3
Char
default=''
args: 'Third VAT Regime Key'
build_cabecera(self)
build_cabecera_factura(self)
build_cancellation(self)
build_claves(self)
build_datos_factura(self)
build_destinatarios(self)
build_detalle_exenta(self)
build_detalle_no_exenta(self)
build_detalle_no_sujeta(self)
build_detalles_factura(self)
build_emisor(self)
build_encadenamiento_factura_anterior(self)
build_entrega(self)
build_exenta(self)
build_factura(self)
build_factura_rectificativa(self)
build_facturas_rectificadas_sustituidas(self)
build_huella_tbai(self)
build_id_detalle_factura(self)
build_id_factura(self)
build_importe_rectificacion_sustitutiva(self)
build_invoice(self)
build_no_exenta(self)
build_no_sujeta(self)
build_prestacion_servicios(self)
build_sujeta(self)
build_sujetos(self)
build_tbai_invoice(self)
build_tipo_desglose(self)
cancel(self)
error(self)
get_exempted_taxes(self)
get_next_pending_invoice(self, company_id=False, limit=1)
get_not_exempted_taxes(self)
get_not_subject_to_taxes(self)
get_subject_to_taxes(self)
get_taxes(self)
get_tbai_xml_signed_and_signature_value(self)
get_tbai_xml_unsigned(self)
get_ticketbai_api(self, **kwargs)
mark_as_pending(self)
mark_as_sent(self)
mark_chain_as_error(self, invoice_to_error)
send(self, **kwargs)
send_pending_invoices(self)
address
Char
default=''
country_code
Char
required=True
identification_number
Char
default=''
help='Required Identification Number for non spanish customers.'
idtype
Selection
default=TicketBaiCustomerIdType.T02.value
help='Required for non spanish customers.'
selection=[(TicketBaiCustomerIdType.T02.value, 'VAT identification number'), (TicketBaiCustomerIdType.T03.value, 'Passport'), (TicketBaiCustomerIdType.T04.value, 'Official identification document issued by the country or territory of residence'), (TicketBaiCustomerIdType.T05.value, 'Residence certificate'), (TicketBaiCustomerIdType.T06.value, 'Other document')]
string='Identification Type Code'
name
Char
help='Name and surname, or business name.'
required=True
nif
Char
default=''
help='Spanish Fiscal Identification Number'
args: 'NIF'
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
zip
Char
default=''
args: 'ZIP Code'
No public methods.
amount_total
Char
help='String of float with 12 digits and 2 decimal points.'
required=True
description
Char
required=True
discount_amount
Char
default='0.00'
help='String of float with 12 digits and 2 decimal points.'
price_unit
Char
help='String of float with 12 digits and 8 decimal points.'
required=True
quantity
Char
help='String of float with 12 digits and 2 decimal points.'
required=True
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
No public methods.
expedition_date
Char
required=True
number
Char
required=True
number_prefix
Char
default=''
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
No public methods.
amount
Char
default=''
help='String of float with 3 digits and 2 decimal points.'
args: 'Amount (%)'
amount_total
Char
default=''
help='String of float with 12 digits and 2 decimal points.'
base
Char
default=''
help='String of float with 12 digits and 3 decimal points.'
exempted_cause
Selection
help='\n E1: Exenta por el artículo 20 de la Norma Foral del IVA.\n E2: Exenta por el artículo 21 de la Norma Foral del IVA.\n E3: Exenta por el artículo 22 de la Norma Foral del IVA.\n E4: Exenta por el artículo 23 y 24 de la Norma Foral del IVA.\n E5: Exenta por el artículo 25 de la Norma Foral del IVA.\n E6: Exenta por otra causa.\n '
selection=[(ExemptedCause.E1.value, 'E1'), (ExemptedCause.E2.value, 'E2'), (ExemptedCause.E3.value, 'E3'), (ExemptedCause.E4.value, 'E4'), (ExemptedCause.E5.value, 'E5'), (ExemptedCause.E6.value, 'E6')]
is_exempted
Boolean
is_subject_to
Boolean
not_exempted_type
Selection
help='\n S1: Sin inversión del sujeto pasivo.\n S2: Con inversión del sujeto pasivo.\n '
selection=[(NotExemptedType.S1.value, 'S1'), (NotExemptedType.S2.value, 'S2')]
not_subject_to_cause
Selection
help='\n OT:\n - No sujeto por el artículo 7 de la Norma Foral de IVA Otros supuestos de no\n sujeción.\n RL:\n - No sujeto por reglas de localización.\n '
selection=[(NotSubjectToCause.OT.value, 'OT'), (NotSubjectToCause.RL.value, 'RL')]
string='Not Subject to Cause'
re_amount
Char
default=''
help='String of float with 3 digits and 2 decimal points.'
args: 'Surcharge Amount (%)'
re_amount_total
Char
default=''
help='String of float with 12 digits and 2 decimal points.'
args: 'Surcharge Amount Total'
surcharge_or_simplified_regime
Selection
default=SurchargeOrSimplifiedRegimeType.N.value
selection=[(SurchargeOrSimplifiedRegimeType.N.value, 'N'), (SurchargeOrSimplifiedRegimeType.S.value, 'S')]
string='Surcharge or Simplified Regime'
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
type
Selection
selection=[(TicketBaiTaxType.service.value, 'Service'), (TicketBaiTaxType.provision_of_goods.value, 'Provision of goods')]
No public methods.
state
Selection
required=True
selection=[(TicketBaiResponseState.RECEIVED.value, 'Received'), (TicketBaiResponseState.REJECTED.value, 'Rejected'), (TicketBaiResponseState.REQUEST_ERROR.value, 'Request error'), (TicketBaiResponseState.BUILD_ERROR.value, 'Build error')]
string='Status'
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
tbai_response_message_ids
One2many → tbai.response.message
comodel_name='tbai.response.message'
inverse_name='tbai_response_id'
xml
Binary
attachment=True
string='XML Response'
xml_fname
Char
prepare_tbai_api_error_values(self, msg)
prepare_tbai_response_values(self, response)
code
Char
required=True
description
Char
required=True
translate=True
tbai_response_id
Many2one → tbai.response
comodel_name='tbai.response'
ondelete='cascade'
required=True
create(self, vals)
name_get(self)
name
Char
required=True
string='Tax Agency name'
qr_base_url
Char
compute='_compute_ticketbai_version'
store=True
string='QR Base URL'
rest_url_cancellation
Char
compute='_compute_ticketbai_version'
store=True
string='REST API URL for Invoice Cancellations'
rest_url_invoice
Char
compute='_compute_ticketbai_version'
store=True
string='REST API URL for Invoices'
sign_file_hash
Char
required=True
string='Sign File HASH'
sign_file_url
Char
required=True
string='Sign File URL'
tax_agency_version_ids
One2many → tbai.tax.agency.version
comodel_name='tbai.tax.agency.version'
inverse_name='tbai_tax_agency_id'
test_qr_base_url
Char
compute='_compute_ticketbai_version'
store=True
string='Test QR Base URL'
test_rest_url_cancellation
Char
compute='_compute_ticketbai_version'
store=True
string='Test - REST API URL for Invoice Cancellations'
test_rest_url_invoice
Char
compute='_compute_ticketbai_version'
store=True
string='Test - REST API URL for Invoices'
version
Char
compute='_compute_ticketbai_version'
store=True
string='TicketBAI version'
get_current_version(self)
date_from
Date
date_to
Date
qr_base_url
Char
required=True
string='QR Base URL'
rest_url_cancellation
Char
string='REST API URL for Invoice Cancellations'
rest_url_invoice
Char
string='REST API URL for Invoices'
tbai_tax_agency_id
Many2one → tbai.tax.agency
comodel_name='tbai.tax.agency'
ondelete='restrict'
required=True
test_qr_base_url
Char
string='Test - QR Base URL'
test_rest_url_cancellation
Char
string='Test - REST API URL for Invoice Cancellations'
test_rest_url_invoice
Char
string='Test - REST API URL for Invoices'
version
Char
required=True
string='TicketBAI version'
No public methods.
| REPOSITORY | |
|---|---|
| REPOSITORY | OCA/l10n-spain |
| GIT | |
| GIT | https://github.com/OCA/l10n-spain.git |
| GIT FOLDER | |
| GIT FOLDER | https://github.com/OCA/l10n-spain/tree/14.0/l10n_es_ticketbai_api |
| VERSION | |
| VERSION | 2.4.4 |
| CATEGORY | |
| CATEGORY | Accounting & Finance |
| LICENSE | |
| LICENSE | AGPL-3 |
| APPLICATION | |
| APPLICATION | No |
| AUTO-INSTALLABLE | |
| AUTO-INSTALLABLE | No |
| AUTHORS | |
| AUTHORS | Odoo Community Association (OCA), Binovo |
| MAINTAINERS | |
| MAINTAINERS | Odoo Community Association (OCA), Binovo |
| COMMITTERS | |
| COMMITTERS | Pedro M. Baeza, Enric Tobella, OCA Transbot, oca-travis, Weblate, OCA-git-bot, Oihane Crucelaegui, oca-ci, Enrique Martín, Aritz Olea, luciaavanzosc |
| WEBSITE | |
| WEBSITE | https://github.com/OCA/l10n-spain |
| LAST TRACKING UPDATE | |
| LAST TRACKING UPDATE | 2026-07-06 00:40:49 |
| ODOO DEPENDENCIES | |
| ODOO DEPENDENCIES |
odoo/odoo: - base - base_setup - web |
| PYTHON DEPENDENCIES | |
| PYTHON DEPENDENCIES |
cryptography<39 pyOpenSSL qrcode xmlsig xmltodict |
| SYSTEM DEPENDENCIES | |
| SYSTEM DEPENDENCIES | Not have |
| DESCRIPTION | |
| DESCRIPTION | |
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
res_config_settings_view_form_inherit_l10n_es_ticketbai_api |
res.config.settings.view.form.inherit.base.setup.inherit.ticketbai_api | res.config.settings | xpath | Inherits base_setup.res_config_settings_view_form |
tbai_certificate_form_view |
tbai.certificate.view.form | tbai.certificate | form | New |
tbai_certificate_search_view |
tbai.certificate.view.search | tbai.certificate | search | New |
tbai_certificate_tree_view |
tbai.certificate.view.tree | tbai.certificate | tree | New |
tbai_installation_form_view |
tbai.installation.view.form | tbai.installation | form | New |
tbai_installation_search_view |
tbai.installation.view.search | tbai.installation | search | New |
tbai_installation_tree_view |
tbai.installation.view.tree | tbai.installation | tree | New |
view_company_form_inherit |
res.company.form.inherit | res.company | xpath | Inherits base.view_company_form |
tbai_certificate_id
Many2one → tbai.certificate
comodel_name='tbai.certificate'
copy=False
domain="[('company_id', '=', id)]"
string='Certificate'
tbai_developer_id
Many2one → res.partner
comodel_name='res.partner'
readonly=True
related='tbai_installation_id.developer_id'
string='Developer'
tbai_device_serial_number
Char
copy=False
default=''
args: 'Device Serial Number'
tbai_enabled
Boolean
copy=False
args: 'Enable TicketBAI'
tbai_installation_id
Many2one → tbai.installation
comodel_name='tbai.installation'
copy=False
tbai_last_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
copy=False
string='Last TicketBAI Invoice sent'
tbai_license_key
Char
readonly=True
related='tbai_installation_id.license_key'
args: 'License Key'
tbai_pro_available
Boolean
copy=False
args: 'Are Production URLs Available'
tbai_software_name
Char
help='Registered name at the Tax Agency.'
readonly=True
related='tbai_installation_id.name'
string='Software Name'
tbai_software_version
Char
copy=False
help='Version of the software.'
related='tbai_installation_id.version'
string='Software Version'
tbai_tax_agency_id
Many2one → tbai.tax.agency
comodel_name='tbai.tax.agency'
copy=False
string='TBAI Tax Agency'
tbai_test_available
Boolean
copy=False
args: 'Are Tests URLs Available'
tbai_test_enabled
Boolean
copy=False
args: 'Enable testing'
tbai_vat_regime_simplified
Boolean
copy=False
args: 'Regime Simplified'
is_operation_in_surcharge_equivalence_or_simplified_regime(self)
onchange_tbai_enabled(self)
onchange_tbai_tax_agency(self)
tbai_build_software(self)
tbai_certificate_get_p12(self)
tbai_certificate_get_p12_buffer(self)
tbai_certificate_get_p12_password(self)
tbai_device_serial_number
Char
readonly=False
related='company_id.tbai_device_serial_number'
string='Device Serial Number'
tbai_enabled
Boolean
readonly=True
related='company_id.tbai_enabled'
No public methods.
tbai_enabled
Boolean
compute='_compute_tbai_enabled'
tbai_partner_identification_number
Char
default=''
help='Used when the identification type code is not VAT identification number.'
args: 'TicketBAI Partner Identification Number'
tbai_partner_idtype
Selection
default=TicketBaiCustomerIdType.T02.value
selection=[(TicketBaiCustomerIdType.T02.value, 'VAT identification number'), (TicketBaiCustomerIdType.T03.value, 'Passport'), (TicketBaiCustomerIdType.T04.value, 'Official identification document issued by the country or territory of residence'), (TicketBaiCustomerIdType.T05.value, 'Residence certificate'), (TicketBaiCustomerIdType.T06.value, 'Other document')]
string='TicketBAI Identification Type Code'
tbai_get_partner_country_code(self)
tbai_get_partner_vat_number(self)
tbai_get_value_apellidos_nombre_razon_social(self)
tbai_get_value_direccion(self)
tbai_get_value_nif(self)
company_id
Many2one → res.company
comodel_name='res.company'
default=<expr>
required=True
string='Company'
datas
Binary
attachment=True
required=True
args: 'P12 Certificate'
name
Char
required=True
password
Char
default=''
get_p12(self)
get_p12_buffer(self)
developer_id
Many2one → res.partner
comodel_name='res.partner'
copy=False
required=True
string='Developer'
license_key
Char
copy=False
required=True
args: 'License Key'
name
Char
copy=False
help='Registered name at the Tax Agency.'
required=True
string='Software Name'
vat
Char
related='developer_id.vat'
args: 'TIN'
version
Char
copy=False
help='Version of the software.'
required=True
string='Software Version'
No public methods.
amount_total
Char
default=''
api_url
Char
compute='_compute_api_url'
args: 'TicketBAI API URL'
company_id
Many2one → res.company
comodel_name='res.company'
required=True
datas
Binary
attachment=True
copy=False
datas_fname
Char
copy=False
args: 'File Name'
description
Char
default='/'
expedition_date
Char
required=True
expedition_hour
Char
default=''
file_size
Integer
copy=False
args: 'File Size'
is_invoice_refund
Boolean
help='TicketBAI Invoice is a refund (Substitution or Differences).'
name
Char
required=True
number
Char
required=True
number_prefix
Char
default=''
operation_date
Char
default=''
previous_tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
copy=False
qr
Binary
attachment=True
compute='_compute_tbai_qr'
copy=False
store=True
string='QR'
qr_url
Char
compute='_compute_tbai_qr'
copy=False
store=True
args: 'URL'
refund_code
Selection
help='BOE-A-1992-28740. Ley 37/1992, de 28 de diciembre, del Impuesto sobre el Valor Añadido. Artículo 80. Modificación de la base imponible.'
selection=[(RefundCode.R1.value, 'Art. 80.1, 80.2, 80.6 and rights founded error'), (RefundCode.R2.value, 'Art. 80.3'), (RefundCode.R3.value, 'Art. 80.4'), (RefundCode.R4.value, 'Art. 80 - other'), (RefundCode.R5.value, 'Simplified Invoice')]
string='Invoice Refund Reason Code'
refund_type
Selection
help='Refund Invoice Type (S/Substitution or I/Differences).'
selection=[(RefundType.substitution.value, 'S'), (RefundType.differences.value, 'I')]
schema
Selection
help='\n * TicketBai: Invoice\n * AnulaTicketBai: Invoice Cancellation\n '
required=True
selection=[(TicketBaiSchema.TicketBai.value, 'TicketBai'), (TicketBaiSchema.AnulaTicketBai.value, 'AnulaTicketBai')]
signature_value
Char
copy=False
default=''
args: 'Signature Value'
simplified_invoice
Selection
help='S/Yes or N/No'
selection=[(SiNoType.S.value, 'S'), (SiNoType.N.value, 'N')]
state
Selection
copy=False
default=TicketBaiInvoiceState.draft.value
index=True
required=True
selection=[(TicketBaiInvoiceState.draft.value, 'Draft'), (TicketBaiInvoiceState.pending.value, 'Pending'), (TicketBaiInvoiceState.sent.value, 'Sent'), (TicketBaiInvoiceState.cancel.value, 'Cancelled'), (TicketBaiInvoiceState.error.value, 'Error')]
string='Status'
substituted_invoice_amount_total_untaxed
Char
default=''
help='\n Original Invoice Total Amount without Taxes. E.g.:\n - Amount Total: 121.0 €\n - Tax Amount: 21 %\n - Total Tax Amount: 21 €\n * Amount Total Untaxed: 100 €\n '
substituted_invoice_total_tax_amount
Char
default=''
help='\n Original Invoice Total Tax Amount. E.g.:\n - Amount Total: 121.0 €\n - Tax Amount: 21 %\n * Total Tax Amount: 21 €\n '
substitutes_simplified_invoice
Selection
help='S/Yes or N/No'
selection=[(SiNoType.S.value, 'S'), (SiNoType.N.value, 'N')]
tax_retention_amount_total
Char
default=''
args: 'Invoice Tax Retention Total Amount'
tbai_customer_ids
One2many → tbai.invoice.customer
comodel_name='tbai.invoice.customer'
copy=True
inverse_name='tbai_invoice_id'
string='TicketBAI Invoice Recipients'
tbai_identifier
Char
compute='_compute_tbai_identifier'
copy=False
store=True
args: 'TBAI Identifier'
tbai_invoice_line_ids
One2many → tbai.invoice.line
comodel_name='tbai.invoice.line'
copy=True
inverse_name='tbai_invoice_id'
string='TicketBAI Invoice Details'
tbai_invoice_refund_ids
One2many → tbai.invoice.refund
comodel_name='tbai.invoice.refund'
copy=True
inverse_name='tbai_invoice_id'
string='Refunded Invoices'
tbai_response_ids
One2many → tbai.response
comodel_name='tbai.response'
inverse_name='tbai_invoice_id'
string='Responses'
tbai_tax_ids
One2many → tbai.invoice.tax
comodel_name='tbai.invoice.tax'
copy=True
inverse_name='tbai_invoice_id'
string='TicketBAI Invoice Taxes'
vat_regime_key
Char
default=''
args: 'VAT Regime Key'
vat_regime_key2
Char
default=''
args: 'Second VAT Regime Key'
vat_regime_key3
Char
default=''
args: 'Third VAT Regime Key'
build_cabecera(self)
build_cabecera_factura(self)
build_cancellation(self)
build_claves(self)
build_datos_factura(self)
build_destinatarios(self)
build_detalle_exenta(self)
build_detalle_no_exenta(self)
build_detalle_no_sujeta(self)
build_detalles_factura(self)
build_emisor(self)
build_encadenamiento_factura_anterior(self)
build_entrega(self)
build_exenta(self)
build_factura(self)
build_factura_rectificativa(self)
build_facturas_rectificadas_sustituidas(self)
build_huella_tbai(self)
build_id_detalle_factura(self)
build_id_factura(self)
build_importe_rectificacion_sustitutiva(self)
build_invoice(self)
build_no_exenta(self)
build_no_sujeta(self)
build_prestacion_servicios(self)
build_sujeta(self)
build_sujetos(self)
build_tbai_invoice(self)
build_tipo_desglose(self)
cancel(self)
error(self)
get_exempted_taxes(self)
get_next_pending_invoice(self, company_id=False, limit=1)
get_not_exempted_taxes(self)
get_not_subject_to_taxes(self)
get_subject_to_taxes(self)
get_taxes(self)
get_tbai_xml_signed_and_signature_value(self)
get_tbai_xml_unsigned(self)
get_ticketbai_api(self, **kwargs)
mark_as_pending(self)
mark_as_sent(self)
mark_chain_as_error(self, invoice_to_error)
send(self, **kwargs)
send_pending_invoices(self)
address
Char
default=''
country_code
Char
required=True
identification_number
Char
default=''
help='Required Identification Number for non spanish customers.'
idtype
Selection
default=TicketBaiCustomerIdType.T02.value
help='Required for non spanish customers.'
selection=[(TicketBaiCustomerIdType.T02.value, 'VAT identification number'), (TicketBaiCustomerIdType.T03.value, 'Passport'), (TicketBaiCustomerIdType.T04.value, 'Official identification document issued by the country or territory of residence'), (TicketBaiCustomerIdType.T05.value, 'Residence certificate'), (TicketBaiCustomerIdType.T06.value, 'Other document')]
string='Identification Type Code'
name
Char
help='Name and surname, or business name.'
required=True
nif
Char
default=''
help='Spanish Fiscal Identification Number'
args: 'NIF'
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
zip
Char
default=''
args: 'ZIP Code'
No public methods.
amount_total
Char
help='String of float with 12 digits and 2 decimal points.'
required=True
args: 'Amount Total'
description
Char
required=True
args: 'Description'
discount_amount
Char
default='0.00'
help='String of float with 12 digits and 2 decimal points.'
args: 'Discount Amount'
price_unit
Char
help='String of float with 12 digits and 8 decimal points.'
required=True
args: 'Price Unit'
quantity
Char
help='String of float with 12 digits and 2 decimal points.'
required=True
args: 'Quantity'
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
No public methods.
expedition_date
Char
required=True
number
Char
required=True
number_prefix
Char
default=''
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
No public methods.
amount
Char
default=''
help='String of float with 3 digits and 2 decimal points.'
args: 'Amount (%)'
amount_total
Char
default=''
help='String of float with 12 digits and 2 decimal points.'
args: 'Amount Total'
base
Char
default=''
help='String of float with 12 digits and 3 decimal points.'
args: 'Base'
exempted_cause
Selection
help='\n E1: Exenta por el artículo 20 de la Norma Foral del IVA.\n E2: Exenta por el artículo 21 de la Norma Foral del IVA.\n E3: Exenta por el artículo 22 de la Norma Foral del IVA.\n E4: Exenta por el artículo 23 y 24 de la Norma Foral del IVA.\n E5: Exenta por el artículo 25 de la Norma Foral del IVA.\n E6: Exenta por otra causa.\n '
selection=[(ExemptedCause.E1.value, 'E1'), (ExemptedCause.E2.value, 'E2'), (ExemptedCause.E3.value, 'E3'), (ExemptedCause.E4.value, 'E4'), (ExemptedCause.E5.value, 'E5'), (ExemptedCause.E6.value, 'E6')]
string='Exempted Cause'
is_exempted
Boolean
is_subject_to
Boolean
not_exempted_type
Selection
help='\n S1: Sin inversión del sujeto pasivo.\n S2: Con inversión del sujeto pasivo.\n '
selection=[(NotExemptedType.S1.value, 'S1'), (NotExemptedType.S2.value, 'S2')]
string='Not Exempted Type'
not_subject_to_cause
Selection
help='\n OT:\n - No sujeto por el artículo 7 de la Norma Foral de IVA Otros supuestos de no\n sujeción.\n RL:\n - No sujeto por reglas de localización.\n '
selection=[(NotSubjectToCause.OT.value, 'OT'), (NotSubjectToCause.RL.value, 'RL')]
string='Not Subject to Cause'
re_amount
Char
default=''
help='String of float with 3 digits and 2 decimal points.'
args: 'Surcharge Amount (%)'
re_amount_total
Char
default=''
help='String of float with 12 digits and 2 decimal points.'
args: 'Surcharge Amount Total'
surcharge_or_simplified_regime
Selection
default=SurchargeOrSimplifiedRegimeType.N.value
selection=[(SurchargeOrSimplifiedRegimeType.N.value, 'N'), (SurchargeOrSimplifiedRegimeType.S.value, 'S')]
string='Surcharge or Simplified Regime'
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
type
Selection
selection=[(TicketBaiTaxType.service.value, 'Service'), (TicketBaiTaxType.provision_of_goods.value, 'Provision of goods')]
No public methods.
state
Selection
required=True
selection=[(TicketBaiResponseState.RECEIVED.value, 'Received'), (TicketBaiResponseState.REJECTED.value, 'Rejected'), (TicketBaiResponseState.REQUEST_ERROR.value, 'Request error'), (TicketBaiResponseState.BUILD_ERROR.value, 'Build error')]
string='Status'
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
tbai_response_message_ids
One2many → tbai.response.message
comodel_name='tbai.response.message'
inverse_name='tbai_response_id'
xml
Binary
attachment=True
string='XML Response'
xml_fname
Char
prepare_tbai_api_error_values(self, msg)
prepare_tbai_response_values(self, response)
code
Char
required=True
description
Char
required=True
translate=True
tbai_response_id
Many2one → tbai.response
comodel_name='tbai.response'
ondelete='cascade'
required=True
create(self, vals)
name_get(self)
name
Char
required=True
string='Tax Agency name'
qr_base_url
Char
compute='_compute_ticketbai_version'
store=True
string='QR Base URL'
rest_url_cancellation
Char
compute='_compute_ticketbai_version'
store=True
string='REST API URL for Invoice Cancellations'
rest_url_invoice
Char
compute='_compute_ticketbai_version'
store=True
string='REST API URL for Invoices'
sign_file_hash
Char
required=True
string='Sign File HASH'
sign_file_url
Char
required=True
string='Sign File URL'
tax_agency_version_ids
One2many → tbai.tax.agency.version
comodel_name='tbai.tax.agency.version'
inverse_name='tbai_tax_agency_id'
test_qr_base_url
Char
compute='_compute_ticketbai_version'
store=True
string='Test QR Base URL'
test_rest_url_cancellation
Char
compute='_compute_ticketbai_version'
store=True
string='Test - REST API URL for Invoice Cancellations'
test_rest_url_invoice
Char
compute='_compute_ticketbai_version'
store=True
string='Test - REST API URL for Invoices'
version
Char
compute='_compute_ticketbai_version'
store=True
string='TicketBAI version'
get_current_version(self)
date_from
Date
string='Date from'
date_to
Date
string='Date to'
qr_base_url
Char
required=True
string='QR Base URL'
rest_url_cancellation
Char
string='REST API URL for Invoice Cancellations'
rest_url_invoice
Char
string='REST API URL for Invoices'
tbai_tax_agency_id
Many2one → tbai.tax.agency
comodel_name='tbai.tax.agency'
ondelete='restrict'
required=True
test_qr_base_url
Char
string='Test - QR Base URL'
test_rest_url_cancellation
Char
string='Test - REST API URL for Invoice Cancellations'
test_rest_url_invoice
Char
string='Test - REST API URL for Invoices'
version
Char
required=True
string='TicketBAI version'
No public methods.
| REPOSITORY | |
|---|---|
| REPOSITORY | OCA/l10n-spain |
| GIT | |
| GIT | https://github.com/OCA/l10n-spain.git |
| GIT FOLDER | |
| GIT FOLDER | https://github.com/OCA/l10n-spain/tree/13.0/l10n_es_ticketbai_api |
| VERSION | |
| VERSION | 1.5.8 |
| CATEGORY | |
| CATEGORY | Accounting & Finance |
| LICENSE | |
| LICENSE | AGPL-3 |
| APPLICATION | |
| APPLICATION | No |
| AUTO-INSTALLABLE | |
| AUTO-INSTALLABLE | No |
| AUTHORS | |
| AUTHORS | Odoo Community Association (OCA), Binovo |
| MAINTAINERS | |
| MAINTAINERS | Odoo Community Association (OCA), Binovo |
| COMMITTERS | |
| COMMITTERS | Pedro M. Baeza, OCA Transbot, oca-travis, Weblate, OCA-git-bot, AdrianC, oca-ci, Aritz Olea |
| WEBSITE | |
| WEBSITE | https://github.com/OCA/l10n-spain |
| LAST TRACKING UPDATE | |
| LAST TRACKING UPDATE | 2026-07-06 00:34:09 |
| ODOO DEPENDENCIES | |
| ODOO DEPENDENCIES |
odoo/odoo: - base - base_setup - web |
| PYTHON DEPENDENCIES | |
| PYTHON DEPENDENCIES |
OpenSSL cryptography<39 qrcode requests_pkcs12 xmlsig xmltodict |
| SYSTEM DEPENDENCIES | |
| SYSTEM DEPENDENCIES | Not have |
| DESCRIPTION | |
| DESCRIPTION | |
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
res_config_settings_view_form_inherit_l10n_es_ticketbai_api |
res.config.settings.view.form.inherit.base.setup.inherit.ticketbai_api | res.config.settings | xpath | Inherits base_setup.res_config_settings_view_form |
tbai_certificate_form_view |
tbai.certificate.view.form | tbai.certificate | form | New |
tbai_certificate_search_view |
tbai.certificate.view.search | tbai.certificate | search | New |
tbai_certificate_tree_view |
tbai.certificate.view.tree | tbai.certificate | tree | New |
tbai_installation_form_view |
tbai.installation.view.form | tbai.installation | form | New |
tbai_installation_search_view |
tbai.installation.view.search | tbai.installation | search | New |
tbai_installation_tree_view |
tbai.installation.view.tree | tbai.installation | tree | New |
view_company_form_inherit |
res.company.form.inherit | res.company | xpath | Inherits base.view_company_form |
tbai_certificate_id
Many2one → tbai.certificate
comodel_name='tbai.certificate'
copy=False
domain="[('company_id', '=', id)]"
string='Certificate'
tbai_developer_id
Many2one → res.partner
comodel_name='res.partner'
readonly=True
related='tbai_installation_id.developer_id'
string='Developer'
tbai_device_serial_number
Char
copy=False
default=''
args: 'Device Serial Number'
tbai_enabled
Boolean
copy=False
args: 'Enable TicketBAI'
tbai_installation_id
Many2one → tbai.installation
comodel_name='tbai.installation'
copy=False
tbai_last_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
copy=False
string='Last TicketBAI Invoice sent'
tbai_license_key
Char
readonly=True
related='tbai_installation_id.license_key'
args: 'License Key'
tbai_pro_available
Boolean
copy=False
args: 'Are Production URLs Available'
tbai_software_name
Char
help='Registered name at the Tax Agency.'
readonly=True
related='tbai_installation_id.name'
string='Software Name'
tbai_software_version
Char
copy=False
help='Version of the software.'
related='tbai_installation_id.version'
string='Software Version'
tbai_tax_agency_id
Many2one → tbai.tax.agency
comodel_name='tbai.tax.agency'
copy=False
string='TicketBAI Tax Agency'
tbai_test_available
Boolean
copy=False
args: 'Are Tests URLs Available'
tbai_test_enabled
Boolean
copy=False
args: 'Enable testing'
tbai_vat_regime_simplified
Boolean
copy=False
args: 'Regime Simplified'
onchange_tbai_enabled(self)
onchange_tbai_tax_agency(self)
tbai_build_software(self)
tbai_certificate_get_p12(self)
tbai_certificate_get_p12_buffer(self)
tbai_certificate_get_p12_password(self)
tbai_device_serial_number
Char
readonly=False
related='company_id.tbai_device_serial_number'
string='Device Serial Number'
tbai_enabled
Boolean
readonly=True
related='company_id.tbai_enabled'
No public methods.
tbai_enabled
Boolean
compute='_compute_tbai_enabled'
tbai_partner_identification_number
Char
default=''
help='Used when the identification type code is not VAT identification number.'
args: 'TicketBAI Partner Identification Number'
tbai_partner_idtype
Selection
default=TicketBaiCustomerIdType.T02.value
selection=[(TicketBaiCustomerIdType.T02.value, 'VAT identification number'), (TicketBaiCustomerIdType.T03.value, 'Passport'), (TicketBaiCustomerIdType.T04.value, 'Official identification document issued by the country or territory of residence'), (TicketBaiCustomerIdType.T05.value, 'Residence certificate'), (TicketBaiCustomerIdType.T06.value, 'Other document')]
string='TicketBAI Identification Type Code'
tbai_get_partner_country_code(self)
tbai_get_partner_vat_number(self)
tbai_get_value_apellidos_nombre_razon_social(self)
tbai_get_value_direccion(self)
tbai_get_value_nif(self)
company_id
Many2one → res.company
comodel_name='res.company'
default=<expr>
required=True
string='Company'
datas
Binary
attachment=True
required=True
args: 'P12 Certificate'
name
Char
required=True
password
Char
default=''
get_p12(self)
get_p12_buffer(self)
developer_id
Many2one → res.partner
comodel_name='res.partner'
copy=False
required=True
string='Developer'
license_key
Char
copy=False
required=True
args: 'License Key'
name
Char
copy=False
help='Registered name at the Tax Agency.'
required=True
string='Software Name'
vat
Char
related='developer_id.vat'
args: 'TIN'
version
Char
copy=False
help='Version of the software.'
required=True
string='Software Version'
No public methods.
amount_total
Char
default=''
api_url
Char
compute='_compute_api_url'
args: 'TicketBAI API URL'
company_id
Many2one → res.company
comodel_name='res.company'
required=True
datas
Binary
attachment=True
copy=False
datas_fname
Char
copy=False
args: 'File Name'
description
Char
default='/'
expedition_date
Char
required=True
expedition_hour
Char
default=''
file_size
Integer
copy=False
args: 'File Size'
is_invoice_refund
Boolean
help='TicketBAI Invoice is a refund (Substitution or Differences).'
name
Char
required=True
number
Char
required=True
number_prefix
Char
default=''
operation_date
Char
default=''
previous_tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
copy=False
qr
Binary
attachment=True
compute='_compute_tbai_qr'
copy=False
store=True
string='QR'
qr_url
Char
compute='_compute_tbai_qr'
copy=False
store=True
args: 'URL'
refund_code
Selection
help='BOE-A-1992-28740. Ley 37/1992, de 28 de diciembre, del Impuesto sobre el Valor Añadido. Artículo 80. Modificación de la base imponible.'
selection=[(RefundCode.R1.value, 'Art. 80.1, 80.2, 80.6 and rights founded error'), (RefundCode.R2.value, 'Art. 80.3'), (RefundCode.R3.value, 'Art. 80.4'), (RefundCode.R4.value, 'Art. 80 - other')]
string='Invoice Refund Reason Code'
refund_type
Selection
help='Refund Invoice Type (S/Substitution or I/Differences).'
selection=[(RefundType.substitution.value, 'S'), (RefundType.differences.value, 'I')]
schema
Selection
help='\n * TicketBai: Invoice\n * AnulaTicketBai: Invoice Cancellation\n '
required=True
selection=[(TicketBaiSchema.TicketBai.value, 'TicketBai'), (TicketBaiSchema.AnulaTicketBai.value, 'AnulaTicketBai')]
signature_value
Char
copy=False
default=''
args: 'Signature Value'
simplified_invoice
Selection
help='S/Yes or N/No'
selection=[(SiNoType.S.value, 'S'), (SiNoType.N.value, 'N')]
state
Selection
copy=False
default=TicketBaiInvoiceState.draft.value
index=True
required=True
selection=[(TicketBaiInvoiceState.draft.value, 'Draft'), (TicketBaiInvoiceState.pending.value, 'Pending'), (TicketBaiInvoiceState.sent.value, 'Sent'), (TicketBaiInvoiceState.cancel.value, 'Cancelled'), (TicketBaiInvoiceState.error.value, 'Error')]
string='Status'
substituted_invoice_amount_total_untaxed
Char
default=''
help='\n Original Invoice Total Amount without Taxes. E.g.:\n - Amount Total: 121.0 €\n - Tax Amount: 21 %\n - Total Tax Amount: 21 €\n * Amount Total Untaxed: 100 €\n '
substituted_invoice_total_tax_amount
Char
default=''
help='\n Original Invoice Total Tax Amount. E.g.:\n - Amount Total: 121.0 €\n - Tax Amount: 21 %\n * Total Tax Amount: 21 €\n '
substitutes_simplified_invoice
Selection
help='S/Yes or N/No'
selection=[(SiNoType.S.value, 'S'), (SiNoType.N.value, 'N')]
tax_retention_amount_total
Char
default=''
args: 'Invoice Tax Retention Total Amount'
tbai_customer_ids
One2many → tbai.invoice.customer
comodel_name='tbai.invoice.customer'
copy=True
inverse_name='tbai_invoice_id'
string='TicketBAI Invoice Recipients'
tbai_identifier
Char
compute='_compute_tbai_identifier'
copy=False
store=True
args: 'TBAI Identifier'
tbai_invoice_line_ids
One2many → tbai.invoice.line
comodel_name='tbai.invoice.line'
copy=True
inverse_name='tbai_invoice_id'
string='TicketBAI Invoice Details'
tbai_invoice_refund_ids
One2many → tbai.invoice.refund
comodel_name='tbai.invoice.refund'
copy=True
inverse_name='tbai_invoice_id'
string='Refunded Invoices'
tbai_response_ids
One2many → tbai.response
comodel_name='tbai.response'
inverse_name='tbai_invoice_id'
string='Responses'
tbai_tax_ids
One2many → tbai.invoice.tax
comodel_name='tbai.invoice.tax'
copy=True
inverse_name='tbai_invoice_id'
string='TicketBAI Invoice Taxes'
vat_regime_key
Char
default=''
args: 'VAT Regime Key'
vat_regime_key2
Char
default=''
args: 'Second VAT Regime Key'
vat_regime_key3
Char
default=''
args: 'Third VAT Regime Key'
build_cabecera(self)
build_cabecera_factura(self)
build_cancellation(self)
build_claves(self)
build_datos_factura(self)
build_destinatarios(self)
build_detalle_exenta(self)
build_detalle_no_exenta(self)
build_detalle_no_sujeta(self)
build_detalles_factura(self)
build_emisor(self)
build_encadenamiento_factura_anterior(self)
build_entrega(self)
build_exenta(self)
build_factura(self)
build_factura_rectificativa(self)
build_facturas_rectificadas_sustituidas(self)
build_huella_tbai(self)
build_id_detalle_factura(self)
build_id_factura(self)
build_importe_rectificacion_sustitutiva(self)
build_invoice(self)
build_no_exenta(self)
build_no_sujeta(self)
build_prestacion_servicios(self)
build_sujeta(self)
build_sujetos(self)
build_tbai_invoice(self)
build_tipo_desglose(self)
cancel(self)
error(self)
get_exempted_taxes(self)
get_next_pending_invoice(self, company_id=False, limit=1)
get_not_exempted_taxes(self)
get_not_subject_to_taxes(self)
get_subject_to_taxes(self)
get_taxes(self)
get_tbai_xml_signed_and_signature_value(self)
get_tbai_xml_unsigned(self)
get_ticketbai_api(self, **kwargs)
mark_as_pending(self)
mark_as_sent(self)
mark_chain_as_error(self, invoice_to_error)
send(self, **kwargs)
send_pending_invoices(self)
address
Char
default=''
country_code
Char
required=True
identification_number
Char
default=''
help='Required Identification Number for non spanish customers.'
idtype
Selection
default=TicketBaiCustomerIdType.T02.value
help='Required for non spanish customers.'
selection=[(TicketBaiCustomerIdType.T02.value, 'VAT identification number'), (TicketBaiCustomerIdType.T03.value, 'Passport'), (TicketBaiCustomerIdType.T04.value, 'Official identification document issued by the country or territory of residence'), (TicketBaiCustomerIdType.T05.value, 'Residence certificate'), (TicketBaiCustomerIdType.T06.value, 'Other document')]
string='Identification Type Code'
name
Char
help='Name and surname, or business name.'
required=True
nif
Char
default=''
help='Spanish Fiscal Identification Number'
args: 'NIF'
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
zip
Char
default=''
args: 'ZIP Code'
No public methods.
amount_total
Char
help='String of float with 12 digits and 2 decimal points.'
required=True
args: 'Amount Total'
description
Char
required=True
args: 'Description'
discount_amount
Char
default='0.00'
help='String of float with 12 digits and 2 decimal points.'
args: 'Discount Amount'
price_unit
Char
help='String of float with 12 digits and 8 decimal points.'
required=True
args: 'Price Unit'
quantity
Char
help='String of float with 12 digits and 2 decimal points.'
required=True
args: 'Quantity'
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
No public methods.
expedition_date
Char
required=True
number
Char
required=True
number_prefix
Char
default=''
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
No public methods.
amount
Char
default=''
help='String of float with 3 digits and 2 decimal points.'
args: 'Amount (%)'
amount_total
Char
default=''
help='String of float with 12 digits and 2 decimal points.'
args: 'Amount Total'
base
Char
default=''
help='String of float with 12 digits and 3 decimal points.'
args: 'Base'
exempted_cause
Selection
help='\n E1: Exenta por el artículo 20 de la Norma Foral del IVA.\n E2: Exenta por el artículo 21 de la Norma Foral del IVA.\n E3: Exenta por el artículo 22 de la Norma Foral del IVA.\n E4: Exenta por el artículo 23 y 24 de la Norma Foral del IVA.\n E5: Exenta por el artículo 25 de la Norma Foral del IVA.\n E6: Exenta por otra causa.\n '
selection=[(ExemptedCause.E1.value, 'E1'), (ExemptedCause.E2.value, 'E2'), (ExemptedCause.E3.value, 'E3'), (ExemptedCause.E4.value, 'E4'), (ExemptedCause.E5.value, 'E5'), (ExemptedCause.E6.value, 'E6')]
string='Exempted Cause'
is_exempted
Boolean
is_subject_to
Boolean
not_exempted_type
Selection
help='\n S1: Sin inversión del sujeto pasivo.\n S2: Con inversión del sujeto pasivo.\n '
selection=[(NotExemptedType.S1.value, 'S1'), (NotExemptedType.S2.value, 'S2')]
string='Not Exempted Type'
not_subject_to_cause
Selection
help='\n OT:\n - No sujeto por el artículo 7 de la Norma Foral de IVA Otros supuestos de no\n sujeción.\n RL:\n - No sujeto por reglas de localización.\n '
selection=[(NotSubjectToCause.OT.value, 'OT'), (NotSubjectToCause.RL.value, 'RL')]
string='Not Subject to Cause'
re_amount
Char
default=''
help='String of float with 3 digits and 2 decimal points.'
args: 'Surcharge Amount (%)'
re_amount_total
Char
default=''
help='String of float with 12 digits and 2 decimal points.'
args: 'Surcharge Amount Total'
surcharge_or_simplified_regime
Selection
default=SurchargeOrSimplifiedRegimeType.N.value
selection=[(SurchargeOrSimplifiedRegimeType.N.value, 'N'), (SurchargeOrSimplifiedRegimeType.S.value, 'S')]
string='Surcharge or Simplified Regime'
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
type
Selection
selection=[(TicketBaiTaxType.service.value, 'Service'), (TicketBaiTaxType.provision_of_goods.value, 'Provision of goods')]
No public methods.
state
Selection
required=True
selection=[(TicketBaiResponseState.RECEIVED.value, 'Received'), (TicketBaiResponseState.REJECTED.value, 'Rejected'), (TicketBaiResponseState.REQUEST_ERROR.value, 'Request error'), (TicketBaiResponseState.BUILD_ERROR.value, 'Build error')]
string='Status'
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
tbai_response_message_ids
One2many → tbai.response.message
comodel_name='tbai.response.message'
inverse_name='tbai_response_id'
xml
Binary
attachment=True
string='XML Response'
xml_fname
Char
prepare_tbai_api_error_values(self, msg)
prepare_tbai_response_values(self, response)
code
Char
required=True
description
Char
required=True
translate=True
tbai_response_id
Many2one → tbai.response
comodel_name='tbai.response'
ondelete='cascade'
required=True
create(self, vals)
name_get(self)
name
Char
required=True
string='Tax Agency name'
qr_base_url
Char
compute='_compute_ticketbai_version'
store=True
string='QR Base URL'
rest_url_cancellation
Char
compute='_compute_ticketbai_version'
store=True
string='REST API URL for Invoice Cancellations'
rest_url_invoice
Char
compute='_compute_ticketbai_version'
store=True
string='REST API URL for Invoices'
sign_file_hash
Char
required=True
string='Sign File HASH'
sign_file_url
Char
required=True
string='Sign File URL'
tax_agency_version_ids
One2many → tbai.tax.agency.version
comodel_name='tbai.tax.agency.version'
inverse_name='tbai_tax_agency_id'
test_qr_base_url
Char
compute='_compute_ticketbai_version'
store=True
string='Test QR Base URL'
test_rest_url_cancellation
Char
compute='_compute_ticketbai_version'
store=True
string='Test - REST API URL for Invoice Cancellations'
test_rest_url_invoice
Char
compute='_compute_ticketbai_version'
store=True
string='Test - REST API URL for Invoices'
version
Char
compute='_compute_ticketbai_version'
store=True
string='TicketBAI version'
get_current_version(self)
date_from
Date
string='Date from'
date_to
Date
string='Date to'
qr_base_url
Char
required=True
string='QR Base URL'
rest_url_cancellation
Char
string='REST API URL for Invoice Cancellations'
rest_url_invoice
Char
string='REST API URL for Invoices'
tbai_tax_agency_id
Many2one → tbai.tax.agency
comodel_name='tbai.tax.agency'
ondelete='restrict'
required=True
test_qr_base_url
Char
string='Test - QR Base URL'
test_rest_url_cancellation
Char
string='Test - REST API URL for Invoice Cancellations'
test_rest_url_invoice
Char
string='Test - REST API URL for Invoices'
version
Char
required=True
string='TicketBAI version'
No public methods.
| REPOSITORY | |
|---|---|
| REPOSITORY | OCA/l10n-spain |
| GIT | |
| GIT | https://github.com/OCA/l10n-spain.git |
| GIT FOLDER | |
| GIT FOLDER | https://github.com/OCA/l10n-spain/tree/12.0/l10n_es_ticketbai_api |
| VERSION | |
| VERSION | 2.3.8 |
| CATEGORY | |
| CATEGORY | Accounting & Finance |
| LICENSE | |
| LICENSE | AGPL-3 |
| APPLICATION | |
| APPLICATION | No |
| AUTO-INSTALLABLE | |
| AUTO-INSTALLABLE | No |
| AUTHORS | |
| AUTHORS | Odoo Community Association (OCA), Binovo |
| MAINTAINERS | |
| MAINTAINERS | Odoo Community Association (OCA), Binovo |
| COMMITTERS | |
| COMMITTERS | OCA Transbot, oca-travis, Weblate, OCA-git-bot, Oihane Crucelaegui, oca-ci, Aritz Olea, xAdrianC, Tu Nombre, ao-landoo |
| WEBSITE | |
| WEBSITE | https://github.com/OCA/l10n-spain |
| LAST TRACKING UPDATE | |
| LAST TRACKING UPDATE | 2026-07-06 00:29:13 |
| ODOO DEPENDENCIES | |
| ODOO DEPENDENCIES |
odoo/odoo: - base - base_setup - web |
| PYTHON DEPENDENCIES | |
| PYTHON DEPENDENCIES |
OpenSSL cryptography qrcode requests_pkcs12 xmlsig xmltodict |
| SYSTEM DEPENDENCIES | |
| SYSTEM DEPENDENCIES | Not have |
| DESCRIPTION | |
| DESCRIPTION | |
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
res_config_settings_view_form_inherit_l10n_es_ticketbai_api |
res.config.settings.view.form.inherit.base.setup.inherit.ticketbai_api | res.config.settings | xpath | Inherits base_setup.res_config_settings_view_form |
tbai_certificate_form_view |
tbai.certificate.view.form | tbai.certificate | form | New |
tbai_certificate_search_view |
tbai.certificate.view.search | tbai.certificate | search | New |
tbai_certificate_tree_view |
tbai.certificate.view.tree | tbai.certificate | tree | New |
tbai_installation_form_view |
tbai.installation.view.form | tbai.installation | form | New |
tbai_installation_search_view |
tbai.installation.view.search | tbai.installation | search | New |
tbai_installation_tree_view |
tbai.installation.view.tree | tbai.installation | tree | New |
view_company_form_inherit |
res.company.form.inherit | res.company | xpath | Inherits base.view_company_form |
tbai_certificate_id
Many2one → tbai.certificate
comodel_name='tbai.certificate'
copy=False
domain="[('company_id', '=', id)]"
string='Certificate'
tbai_developer_id
Many2one → res.partner
comodel_name='res.partner'
readonly=True
related='tbai_installation_id.developer_id'
string='Developer'
tbai_device_serial_number
Char
copy=False
default=''
args: 'Device Serial Number'
tbai_enabled
Boolean
copy=False
args: 'Enable TicketBAI'
tbai_installation_id
Many2one → tbai.installation
comodel_name='tbai.installation'
copy=False
tbai_last_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
copy=False
string='Last TicketBAI Invoice sent'
tbai_license_key
Char
readonly=True
related='tbai_installation_id.license_key'
args: 'License Key'
tbai_pro_available
Boolean
copy=False
args: 'Are Production URLs Available'
tbai_software_name
Char
help='Registered name at the Tax Agency.'
readonly=True
related='tbai_installation_id.name'
string='Software Name'
tbai_tax_agency_id
Many2one → tbai.tax.agency
comodel_name='tbai.tax.agency'
copy=False
string='TicketBAI Tax Agency'
tbai_test_available
Boolean
copy=False
args: 'Are Tests URLs Available'
tbai_test_enabled
Boolean
copy=False
args: 'Enable testing'
tbai_vat_regime_simplified
Boolean
copy=False
args: 'Regime Simplified'
onchange_tbai_enabled(self)
onchange_tbai_tax_agency(self)
tbai_build_software(self)
tbai_certificate_get_p12(self)
tbai_certificate_get_p12_buffer(self)
tbai_certificate_get_p12_password(self)
tbai_device_serial_number
Char
company_dependent=True
readonly=False
related='company_id.tbai_device_serial_number'
string='Device Serial Number'
tbai_enabled
Boolean
company_dependent=True
readonly=True
related='company_id.tbai_enabled'
No public methods.
tbai_enabled
Boolean
readonly=True
related='company_id.tbai_enabled'
tbai_partner_identification_number
Char
default=''
help='Used when the identification type code is not VAT identification number.'
args: 'TicketBAI Partner Identification Number'
tbai_partner_idtype
Selection
default=TicketBaiCustomerIdType.T02.value
selection=[(TicketBaiCustomerIdType.T02.value, 'VAT identification number'), (TicketBaiCustomerIdType.T03.value, 'Passport'), (TicketBaiCustomerIdType.T04.value, 'Official identification document issued by the country or territory of residence'), (TicketBaiCustomerIdType.T05.value, 'Residence certificate'), (TicketBaiCustomerIdType.T06.value, 'Other document')]
string='TicketBAI Identification Type Code'
tbai_get_partner_country_code(self)
tbai_get_partner_vat_number(self)
tbai_get_value_apellidos_nombre_razon_social(self)
tbai_get_value_direccion(self)
tbai_get_value_nif(self)
company_id
Many2one → res.company
comodel_name='res.company'
default=<expr>
required=True
string='Company'
datas
Binary
attachment=True
required=True
args: 'P12 Certificate'
name
Char
required=True
password
Char
default=''
get_p12(self)
get_p12_buffer(self)
developer_id
Many2one → res.partner
comodel_name='res.partner'
copy=False
required=True
string='Developer'
license_key
Char
copy=False
required=True
args: 'License Key'
name
Char
copy=False
help='Registered name at the Tax Agency.'
required=True
string='Software Name'
vat
Char
related='developer_id.vat'
args: 'TIN'
No public methods.
amount_total
Char
default=''
api_url
Char
compute='_compute_api_url'
args: 'TicketBAI API URL'
company_id
Many2one → res.company
comodel_name='res.company'
required=True
datas
Binary
attachment=True
copy=False
datas_fname
Char
copy=False
args: 'File Name'
description
Char
default='/'
expedition_date
Char
required=True
expedition_hour
Char
default=''
file_size
Integer
copy=False
args: 'File Size'
is_invoice_refund
Boolean
help='TicketBAI Invoice is a refund (Substitution or Differences).'
name
Char
required=True
number
Char
required=True
number_prefix
Char
default=''
operation_date
Char
default=''
previous_tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
copy=False
qr
Binary
attachment=True
compute='_compute_tbai_qr'
copy=False
store=True
string='QR'
qr_url
Char
compute='_compute_tbai_qr'
copy=False
store=True
args: 'URL'
refund_code
Selection
help='BOE-A-1992-28740. Ley 37/1992, de 28 de diciembre, del Impuesto sobre el Valor Añadido. Artículo 80. Modificación de la base imponible.'
selection=[(RefundCode.R1.value, 'Art. 80.1, 80.2, 80.6 and rights founded error'), (RefundCode.R2.value, 'Art. 80.3'), (RefundCode.R3.value, 'Art. 80.4'), (RefundCode.R4.value, 'Art. 80 - other'), (RefundCode.R5.value, 'Simplified Invoice')]
string='Invoice Refund Reason Code'
refund_type
Selection
help='Refund Invoice Type (S/Substitution or I/Differences).'
selection=[(RefundType.substitution.value, 'S'), (RefundType.differences.value, 'I')]
schema
Selection
help='\n * TicketBai: Invoice\n * AnulaTicketBai: Invoice Cancellation\n '
required=True
selection=[(TicketBaiSchema.TicketBai.value, 'TicketBai'), (TicketBaiSchema.AnulaTicketBai.value, 'AnulaTicketBai')]
signature_value
Char
copy=False
default=''
args: 'Signature Value'
simplified_invoice
Selection
help='S/Yes or N/No'
selection=[(SiNoType.S.value, 'S'), (SiNoType.N.value, 'N')]
state
Selection
copy=False
default=TicketBaiInvoiceState.draft.value
index=True
required=True
selection=[(TicketBaiInvoiceState.draft.value, 'Draft'), (TicketBaiInvoiceState.pending.value, 'Pending'), (TicketBaiInvoiceState.sent.value, 'Sent'), (TicketBaiInvoiceState.cancel.value, 'Cancelled'), (TicketBaiInvoiceState.error.value, 'Error')]
string='Status'
substituted_invoice_amount_total_untaxed
Char
default=''
help='\n Original Invoice Total Amount without Taxes. E.g.:\n - Amount Total: 121.0 €\n - Tax Amount: 21 %\n - Total Tax Amount: 21 €\n * Amount Total Untaxed: 100 €\n '
substituted_invoice_total_tax_amount
Char
default=''
help='\n Original Invoice Total Tax Amount. E.g.:\n - Amount Total: 121.0 €\n - Tax Amount: 21 %\n * Total Tax Amount: 21 €\n '
substitutes_simplified_invoice
Selection
help='S/Yes or N/No'
selection=[(SiNoType.S.value, 'S'), (SiNoType.N.value, 'N')]
tax_retention_amount_total
Char
default=''
args: 'Invoice Tax Retention Total Amount'
tbai_customer_ids
One2many → tbai.invoice.customer
comodel_name='tbai.invoice.customer'
copy=True
inverse_name='tbai_invoice_id'
string='TicketBAI Invoice Recipients'
tbai_identifier
Char
compute='_compute_tbai_identifier'
copy=False
store=True
args: 'TBAI Identifier'
tbai_invoice_line_ids
One2many → tbai.invoice.line
comodel_name='tbai.invoice.line'
copy=True
inverse_name='tbai_invoice_id'
string='TicketBAI Invoice Details'
tbai_invoice_refund_ids
One2many → tbai.invoice.refund
comodel_name='tbai.invoice.refund'
copy=True
inverse_name='tbai_invoice_id'
string='Refunded Invoices'
tbai_response_ids
One2many → tbai.response
comodel_name='tbai.response'
inverse_name='tbai_invoice_id'
string='Responses'
tbai_tax_ids
One2many → tbai.invoice.tax
comodel_name='tbai.invoice.tax'
copy=True
inverse_name='tbai_invoice_id'
string='TicketBAI Invoice Taxes'
vat_regime_key
Char
default=''
args: 'VAT Regime Key'
vat_regime_key2
Char
default=''
args: 'Second VAT Regime Key'
vat_regime_key3
Char
default=''
args: 'Third VAT Regime Key'
build_cabecera(self)
build_cabecera_factura(self)
build_cancellation(self)
build_claves(self)
build_datos_factura(self)
build_destinatarios(self)
build_detalle_exenta(self)
build_detalle_no_exenta(self)
build_detalle_no_sujeta(self)
build_detalles_factura(self)
build_emisor(self)
build_encadenamiento_factura_anterior(self)
build_entrega(self)
build_exenta(self)
build_factura(self)
build_factura_rectificativa(self)
build_facturas_rectificadas_sustituidas(self)
build_huella_tbai(self)
build_id_detalle_factura(self)
build_id_factura(self)
build_importe_rectificacion_sustitutiva(self)
build_invoice(self)
build_no_exenta(self)
build_no_sujeta(self)
build_prestacion_servicios(self)
build_sujeta(self)
build_sujetos(self)
build_tbai_invoice(self)
build_tipo_desglose(self)
cancel(self)
error(self)
get_exempted_taxes(self)
get_next_pending_invoice(self, company_id=False, limit=1)
get_not_exempted_taxes(self)
get_not_subject_to_taxes(self)
get_subject_to_taxes(self)
get_taxes(self)
get_tbai_xml_signed_and_signature_value(self)
get_tbai_xml_unsigned(self)
get_ticketbai_api(self, **kwargs)
mark_as_pending(self)
mark_as_sent(self)
mark_chain_as_error(self, invoice_to_error)
send(self, **kwargs)
send_pending_invoices(self)
address
Char
default=''
country_code
Char
required=True
identification_number
Char
default=''
help='Required Identification Number for non spanish customers.'
idtype
Selection
default=TicketBaiCustomerIdType.T02.value
help='Required for non spanish customers.'
selection=[(TicketBaiCustomerIdType.T02.value, 'VAT identification number'), (TicketBaiCustomerIdType.T03.value, 'Passport'), (TicketBaiCustomerIdType.T04.value, 'Official identification document issued by the country or territory of residence'), (TicketBaiCustomerIdType.T05.value, 'Residence certificate'), (TicketBaiCustomerIdType.T06.value, 'Other document')]
string='Identification Type Code'
name
Char
help='Name and surname, or business name.'
required=True
nif
Char
default=''
help='Spanish Fiscal Identification Number'
args: 'NIF'
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
zip
Char
default=''
args: 'ZIP Code'
No public methods.
amount_total
Char
help='String of float with 12 digits and 2 decimal points.'
required=True
args: 'Amount Total'
description
Char
required=True
args: 'Description'
discount_amount
Char
default='0.00'
help='String of float with 12 digits and 2 decimal points.'
args: 'Discount Amount'
price_unit
Char
help='String of float with 12 digits and 8 decimal points.'
required=True
args: 'Price Unit'
quantity
Char
help='String of float with 12 digits and 2 decimal points.'
required=True
args: 'Quantity'
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
No public methods.
expedition_date
Char
required=True
number
Char
required=True
number_prefix
Char
default=''
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
No public methods.
amount
Char
default=''
help='String of float with 3 digits and 2 decimal points.'
args: 'Amount (%)'
amount_total
Char
default=''
help='String of float with 12 digits and 2 decimal points.'
args: 'Amount Total'
base
Char
default=''
help='String of float with 12 digits and 3 decimal points.'
args: 'Base'
exempted_cause
Selection
help='\n E1: Exenta por el artículo 20 de la Norma Foral del IVA.\n E2: Exenta por el artículo 21 de la Norma Foral del IVA.\n E3: Exenta por el artículo 22 de la Norma Foral del IVA.\n E4: Exenta por el artículo 23 y 24 de la Norma Foral del IVA.\n E5: Exenta por el artículo 25 de la Norma Foral del IVA.\n E6: Exenta por otra causa.\n '
selection=[(ExemptedCause.E1.value, 'E1'), (ExemptedCause.E2.value, 'E2'), (ExemptedCause.E3.value, 'E3'), (ExemptedCause.E4.value, 'E4'), (ExemptedCause.E5.value, 'E5'), (ExemptedCause.E6.value, 'E6')]
string='Exempted Cause'
is_exempted
Boolean
is_subject_to
Boolean
not_exempted_type
Selection
help='\n S1: Sin inversión del sujeto pasivo.\n S2: Con inversión del sujeto pasivo.\n '
selection=[(NotExemptedType.S1.value, 'S1'), (NotExemptedType.S2.value, 'S2')]
string='Not Exempted Type'
not_subject_to_cause
Selection
help='\n OT:\n - No sujeto por el artículo 7 de la Norma Foral de IVA Otros supuestos de no\n sujeción.\n RL:\n - No sujeto por reglas de localización.\n '
selection=[(NotSubjectToCause.OT.value, 'OT'), (NotSubjectToCause.RL.value, 'RL')]
string='Not Subject to Cause'
re_amount
Char
default=''
help='String of float with 3 digits and 2 decimal points.'
args: 'Surcharge Amount (%)'
re_amount_total
Char
default=''
help='String of float with 12 digits and 2 decimal points.'
args: 'Surcharge Amount Total'
surcharge_or_simplified_regime
Selection
default=SurchargeOrSimplifiedRegimeType.N.value
selection=[(SurchargeOrSimplifiedRegimeType.N.value, 'N'), (SurchargeOrSimplifiedRegimeType.S.value, 'S')]
string='Surcharge or Simplified Regime'
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
type
Selection
selection=[(TicketBaiTaxType.service.value, 'Service'), (TicketBaiTaxType.provision_of_goods.value, 'Provision of goods')]
No public methods.
state
Selection
required=True
selection=[(TicketBaiResponseState.RECEIVED.value, 'Received'), (TicketBaiResponseState.REJECTED.value, 'Rejected'), (TicketBaiResponseState.REQUEST_ERROR.value, 'Request error'), (TicketBaiResponseState.BUILD_ERROR.value, 'Build error')]
string='Status'
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
tbai_response_message_ids
One2many → tbai.response.message
comodel_name='tbai.response.message'
inverse_name='tbai_response_id'
xml
Binary
attachment=True
string='XML Response'
xml_fname
Char
prepare_tbai_api_error_values(self, msg, **kwargs)
prepare_tbai_response_values(self, response, **kwargs)
code
Char
required=True
description
Char
required=True
translate=True
tbai_response_id
Many2one → tbai.response
comodel_name='tbai.response'
ondelete='cascade'
required=True
create(self, vals)
name_get(self)
name
Char
required=True
string='Tax Agency name'
qr_base_url
Char
compute='_compute_ticketbai_version'
store=True
string='QR Base URL'
rest_url_cancellation
Char
compute='_compute_ticketbai_version'
store=True
string='REST API URL for Invoice Cancellations'
rest_url_invoice
Char
compute='_compute_ticketbai_version'
store=True
string='REST API URL for Invoices'
sign_file_hash
Char
required=True
string='Sign File HASH'
sign_file_url
Char
required=True
string='Sign File URL'
tax_agency_version_ids
One2many → tbai.tax.agency.version
comodel_name='tbai.tax.agency.version'
inverse_name='tbai_tax_agency_id'
test_qr_base_url
Char
compute='_compute_ticketbai_version'
store=True
string='Test QR Base URL'
test_rest_url_cancellation
Char
compute='_compute_ticketbai_version'
store=True
string='Test - REST API URL for Invoice Cancellations'
test_rest_url_invoice
Char
compute='_compute_ticketbai_version'
store=True
string='Test - REST API URL for Invoices'
version
Char
compute='_compute_ticketbai_version'
store=True
string='TicketBAI version'
get_current_version(self)
date_from
Date
string='Date from'
date_to
Date
string='Date to'
qr_base_url
Char
required=True
string='QR Base URL'
rest_url_cancellation
Char
string='REST API URL for Invoice Cancellations'
rest_url_invoice
Char
string='REST API URL for Invoices'
tbai_tax_agency_id
Many2one → tbai.tax.agency
comodel_name='tbai.tax.agency'
ondelete='restrict'
required=True
test_qr_base_url
Char
string='Test - QR Base URL'
test_rest_url_cancellation
Char
string='Test - REST API URL for Invoice Cancellations'
test_rest_url_invoice
Char
string='Test - REST API URL for Invoices'
version
Char
required=True
string='TicketBAI version'
No public methods.
| REPOSITORY | |
|---|---|
| REPOSITORY | OCA/l10n-spain |
| GIT | |
| GIT | https://github.com/OCA/l10n-spain.git |
| GIT FOLDER | |
| GIT FOLDER | https://github.com/OCA/l10n-spain/tree/11.0/l10n_es_ticketbai_api |
| VERSION | |
| VERSION | 0.7.5 |
| CATEGORY | |
| CATEGORY | Accounting & Finance |
| LICENSE | |
| LICENSE | AGPL-3 |
| APPLICATION | |
| APPLICATION | No |
| AUTO-INSTALLABLE | |
| AUTO-INSTALLABLE | No |
| AUTHORS | |
| AUTHORS | Odoo Community Association (OCA), Binovo |
| MAINTAINERS | |
| MAINTAINERS | Odoo Community Association (OCA), Binovo |
| COMMITTERS | |
| COMMITTERS | Pedro M. Baeza, OCA Transbot, oca-travis, OCA-git-bot, Victor Laskurain, Enrique Martín, arodriguez, Aritz Olea, Guillermo Murcia |
| WEBSITE | |
| WEBSITE | https://github.com/OCA/l10n-spain |
| LAST TRACKING UPDATE | |
| LAST TRACKING UPDATE | 2026-07-06 00:23:55 |
| ODOO DEPENDENCIES | |
| ODOO DEPENDENCIES |
odoo/odoo: - base - base_setup - web |
| PYTHON DEPENDENCIES | |
| PYTHON DEPENDENCIES |
OpenSSL cryptography qrcode requests_pkcs12 xmlsig xmltodict |
| SYSTEM DEPENDENCIES | |
| SYSTEM DEPENDENCIES | Not have |
| DESCRIPTION | |
| DESCRIPTION | |
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
res_config_settings_view_form_inherit_l10n_es_ticketbai_api |
res.config.settings.view.form.inherit.base.setup.inherit.ticketbai_api | res.config.settings | xpath | Inherits base_setup.res_config_settings_view_form |
tbai_certificate_form_view |
tbai.certificate.view.form | tbai.certificate | form | New |
tbai_certificate_search_view |
tbai.certificate.view.search | tbai.certificate | search | New |
tbai_certificate_tree_view |
tbai.certificate.view.tree | tbai.certificate | tree | New |
tbai_installation_form_view |
tbai.installation.view.form | tbai.installation | form | New |
tbai_installation_search_view |
tbai.installation.view.search | tbai.installation | search | New |
tbai_installation_tree_view |
tbai.installation.view.tree | tbai.installation | tree | New |
view_company_form_inherit |
res.company.form.inherit | res.company | xpath | Inherits base.view_company_form |
tbai_certificate_id
Many2one → tbai.certificate
comodel_name='tbai.certificate'
copy=False
domain="[('company_id', '=', id)]"
string='Certificate'
tbai_developer_id
Many2one → res.partner
comodel_name='res.partner'
readonly=True
related='tbai_installation_id.developer_id'
string='Developer'
tbai_device_serial_number
Char
copy=False
default=''
args: 'Device Serial Number'
tbai_enabled
Boolean
copy=False
args: 'Enable TicketBAI'
tbai_installation_id
Many2one → tbai.installation
comodel_name='tbai.installation'
copy=False
tbai_last_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
copy=False
string='Last TicketBAI Invoice sent'
tbai_license_key
Char
readonly=True
related='tbai_installation_id.license_key'
args: 'License Key'
tbai_pro_available
Boolean
copy=False
args: 'Are Production URLs Available'
tbai_software_name
Char
help='Registered name at the Tax Agency.'
readonly=True
related='tbai_installation_id.name'
string='Software Name'
tbai_software_version
Char
copy=False
help='Version of the software.'
related='tbai_installation_id.version'
string='Software Version'
tbai_tax_agency_id
Many2one → tbai.tax.agency
comodel_name='tbai.tax.agency'
copy=False
string='Tax Agency'
tbai_test_available
Boolean
copy=False
args: 'Are Tests URLs Available'
tbai_test_enabled
Boolean
copy=False
args: 'Enable testing'
tbai_vat_regime_simplified
Boolean
copy=False
args: 'Regime Simplified'
onchange_tbai_enabled(self)
onchange_tbai_tax_agency(self)
tbai_build_software(self)
tbai_certificate_get_p12(self)
tbai_certificate_get_p12_buffer(self)
tbai_certificate_get_p12_password(self)
tbai_device_serial_number
Char
company_dependent=True
readonly=False
related='company_id.tbai_device_serial_number'
string='Device Serial Number'
tbai_enabled
Boolean
company_dependent=True
readonly=True
related='company_id.tbai_enabled'
No public methods.
tbai_enabled
Boolean
readonly=True
related='company_id.tbai_enabled'
tbai_partner_identification_number
Char
default=''
help='Used when the identification type code is not VAT identification number.'
args: 'TicketBAI Partner Identification Number'
tbai_partner_idtype
Selection
default=TicketBaiCustomerIdType.T02.value
selection=[(TicketBaiCustomerIdType.T02.value, 'VAT identification number'), (TicketBaiCustomerIdType.T03.value, 'Passport'), (TicketBaiCustomerIdType.T04.value, 'Official identification document issued by the country or territory of residence'), (TicketBaiCustomerIdType.T05.value, 'Residence certificate'), (TicketBaiCustomerIdType.T06.value, 'Other document')]
string='TicketBAI Identification Type Code'
tbai_get_partner_country_code(self)
tbai_get_partner_vat_number(self)
tbai_get_value_apellidos_nombre_razon_social(self)
tbai_get_value_direccion(self)
tbai_get_value_nif(self)
company_id
Many2one → res.company
comodel_name='res.company'
default=<expr>
required=True
string='Company'
datas
Binary
attachment=True
required=True
args: 'P12 Certificate'
name
Char
required=True
password
Char
default=''
get_p12(self)
get_p12_buffer(self)
developer_id
Many2one → res.partner
comodel_name='res.partner'
copy=False
required=True
string='Developer'
license_key
Char
copy=False
required=True
args: 'License Key'
name
Char
copy=False
help='Registered name at the Tax Agency.'
required=True
string='Software Name'
vat
Char
related='developer_id.vat'
args: 'TIN'
version
Char
copy=False
help='Version of the software.'
required=True
string='Software Version'
No public methods.
amount_total
Char
default=''
api_url
Char
compute='_compute_api_url'
args: 'TicketBAI API URL'
company_id
Many2one → res.company
comodel_name='res.company'
required=True
datas
Binary
attachment=True
copy=False
datas_fname
Char
copy=False
args: 'File Name'
description
Char
default='/'
expedition_date
Char
required=True
expedition_hour
Char
default=''
file_size
Integer
copy=False
args: 'File Size'
is_invoice_refund
Boolean
help='TicketBAI Invoice is a refund (Substitution or Differences).'
name
Char
required=True
number
Char
required=True
number_prefix
Char
default=''
operation_date
Char
default=''
previous_tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
copy=False
qr
Binary
attachment=True
compute='_compute_tbai_qr'
copy=False
store=True
string='QR'
qr_url
Char
compute='_compute_tbai_qr'
copy=False
store=True
args: 'URL'
refund_code
Selection
help='BOE-A-1992-28740. Ley 37/1992, de 28 de diciembre, del Impuesto sobre el Valor Añadido. Artículo 80. Modificación de la base imponible.'
selection=[(RefundCode.R1.value, 'Art. 80.1, 80.2, 80.6 and rights founded error'), (RefundCode.R2.value, 'Art. 80.3'), (RefundCode.R3.value, 'Art. 80.4'), (RefundCode.R4.value, 'Art. 80 - other')]
string='Invoice Refund Reason Code'
refund_type
Selection
help='Refund Invoice Type (S/Substitution or I/Differences).'
selection=[(RefundType.substitution.value, 'S'), (RefundType.differences.value, 'I')]
schema
Selection
help='\n * TicketBai: Invoice\n * AnulaTicketBai: Invoice Cancellation\n '
required=True
selection=[(TicketBaiSchema.TicketBai.value, 'TicketBai'), (TicketBaiSchema.AnulaTicketBai.value, 'AnulaTicketBai')]
signature_value
Char
copy=False
default=''
args: 'Signature Value'
simplified_invoice
Selection
help='S/Yes or N/No'
selection=[(SiNoType.S.value, 'S'), (SiNoType.N.value, 'N')]
state
Selection
copy=False
default=TicketBaiInvoiceState.draft.value
index=True
required=True
selection=[(TicketBaiInvoiceState.draft.value, 'Draft'), (TicketBaiInvoiceState.pending.value, 'Pending'), (TicketBaiInvoiceState.sent.value, 'Sent'), (TicketBaiInvoiceState.cancel.value, 'Cancelled'), (TicketBaiInvoiceState.error.value, 'Error')]
substituted_invoice_amount_total_untaxed
Char
default=''
help='\n Original Invoice Total Amount without Taxes. E.g.:\n - Amount Total: 121.0 €\n - Tax Amount: 21 %\n - Total Tax Amount: 21 €\n * Amount Total Untaxed: 100 €\n '
substituted_invoice_total_tax_amount
Char
default=''
help='\n Original Invoice Total Tax Amount. E.g.:\n - Amount Total: 121.0 €\n - Tax Amount: 21 %\n * Total Tax Amount: 21 €\n '
substitutes_simplified_invoice
Selection
help='S/Yes or N/No'
selection=[(SiNoType.S.value, 'S'), (SiNoType.N.value, 'N')]
tax_retention_amount_total
Char
default=''
args: 'Invoice Tax Retention Total Amount'
tbai_customer_ids
One2many → tbai.invoice.customer
comodel_name='tbai.invoice.customer'
copy=True
inverse_name='tbai_invoice_id'
string='TicketBAI Invoice Recipients'
tbai_identifier
Char
compute='_compute_tbai_identifier'
copy=False
store=True
args: 'TBAI Identifier'
tbai_invoice_line_ids
One2many → tbai.invoice.line
comodel_name='tbai.invoice.line'
copy=True
inverse_name='tbai_invoice_id'
string='TicketBAI Invoice Details'
tbai_invoice_refund_ids
One2many → tbai.invoice.refund
comodel_name='tbai.invoice.refund'
copy=True
inverse_name='tbai_invoice_id'
string='Refunded Invoices'
tbai_response_ids
One2many → tbai.response
comodel_name='tbai.response'
inverse_name='tbai_invoice_id'
string='Responses'
tbai_tax_ids
One2many → tbai.invoice.tax
comodel_name='tbai.invoice.tax'
copy=True
inverse_name='tbai_invoice_id'
string='TicketBAI Invoice Taxes'
vat_regime_key
Char
default=''
args: 'VAT Regime Key'
vat_regime_key2
Char
default=''
args: 'Second VAT Regime Key'
vat_regime_key3
Char
default=''
args: 'Third VAT Regime Key'
build_cabecera(self)
build_cabecera_factura(self)
build_cancellation(self)
build_claves(self)
build_datos_factura(self)
build_destinatarios(self)
build_detalle_exenta(self)
build_detalle_no_exenta(self)
build_detalle_no_sujeta(self)
build_detalles_factura(self)
build_emisor(self)
build_encadenamiento_factura_anterior(self)
build_entrega(self)
build_exenta(self)
build_factura(self)
build_factura_rectificativa(self)
build_facturas_rectificadas_sustituidas(self)
build_huella_tbai(self)
build_id_detalle_factura(self)
build_id_factura(self)
build_importe_rectificacion_sustitutiva(self)
build_invoice(self)
build_no_exenta(self)
build_no_sujeta(self)
build_prestacion_servicios(self)
build_sujeta(self)
build_sujetos(self)
build_tbai_invoice(self)
build_tipo_desglose(self)
cancel(self)
error(self)
get_exempted_taxes(self)
get_next_pending_invoice(self, company_id=False, limit=1)
get_not_exempted_taxes(self)
get_not_subject_to_taxes(self)
get_subject_to_taxes(self)
get_taxes(self)
get_tbai_xml_signed_and_signature_value(self)
get_tbai_xml_unsigned(self)
get_ticketbai_api(self, **kwargs)
mark_as_pending(self)
mark_as_sent(self)
mark_chain_as_error(self, invoice_to_error)
send(self, **kwargs)
send_pending_invoices(self)
send_pending_invoices_impl(self)
address
Char
default=''
country_code
Char
required=True
identification_number
Char
default=''
help='Required Identification Number for non spanish customers.'
idtype
Selection
default=TicketBaiCustomerIdType.T02.value
help='Required for non spanish customers.'
selection=[(TicketBaiCustomerIdType.T02.value, 'VAT identification number'), (TicketBaiCustomerIdType.T03.value, 'Passport'), (TicketBaiCustomerIdType.T04.value, 'Official identification document issued by the country or territory of residence'), (TicketBaiCustomerIdType.T05.value, 'Residence certificate'), (TicketBaiCustomerIdType.T06.value, 'Other document')]
string='Identification Type Code'
name
Char
help='Name and surname, or business name.'
required=True
nif
Char
default=''
help='Spanish Fiscal Identification Number'
args: 'NIF'
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
zip
Char
default=''
args: 'ZIP Code'
No public methods.
amount_total
Char
help='String of float with 12 digits and 2 decimal points.'
required=True
args: 'Amount Total'
description
Char
required=True
args: 'Description'
discount_amount
Char
default='0.00'
help='String of float with 12 digits and 2 decimal points.'
args: 'Discount Amount'
price_unit
Char
help='String of float with 12 digits and 8 decimal points.'
required=True
args: 'Price Unit'
quantity
Char
help='String of float with 12 digits and 2 decimal points.'
required=True
args: 'Quantity'
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
No public methods.
expedition_date
Char
required=True
number
Char
required=True
number_prefix
Char
default=''
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
No public methods.
amount
Char
default=''
help='String of float with 3 digits and 2 decimal points.'
args: 'Amount (%)'
amount_total
Char
default=''
help='String of float with 12 digits and 2 decimal points.'
args: 'Amount Total'
base
Char
default=''
help='String of float with 12 digits and 3 decimal points.'
args: 'Base'
exempted_cause
Selection
help='\n E1: Exenta por el artículo 20 de la Norma Foral del IVA.\n E2: Exenta por el artículo 21 de la Norma Foral del IVA.\n E3: Exenta por el artículo 22 de la Norma Foral del IVA.\n E4: Exenta por el artículo 23 y 24 de la Norma Foral del IVA.\n E5: Exenta por el artículo 25 de la Norma Foral del IVA.\n E6: Exenta por otra causa.\n '
selection=[(ExemptedCause.E1.value, 'E1'), (ExemptedCause.E2.value, 'E2'), (ExemptedCause.E3.value, 'E3'), (ExemptedCause.E4.value, 'E4'), (ExemptedCause.E5.value, 'E5'), (ExemptedCause.E6.value, 'E6')]
string='Exempted Cause'
is_exempted
Boolean
is_subject_to
Boolean
not_exempted_type
Selection
help='\n S1: Sin inversión del sujeto pasivo.\n S2: Con inversión del sujeto pasivo.\n '
selection=[(NotExemptedType.S1.value, 'S1'), (NotExemptedType.S2.value, 'S2')]
string='Not Exempted Type'
not_subject_to_cause
Selection
help='\n OT:\n - No sujeto por el artículo 7 de la Norma Foral de IVA Otros supuestos de no\n sujeción.\n RL:\n - No sujeto por reglas de localización.\n '
selection=[(NotSubjectToCause.OT.value, 'OT'), (NotSubjectToCause.RL.value, 'RL')]
string='Not Subject to Cause'
re_amount
Char
default=''
help='String of float with 3 digits and 2 decimal points.'
args: 'Surcharge Amount (%)'
re_amount_total
Char
default=''
help='String of float with 12 digits and 2 decimal points.'
args: 'Surcharge Amount Total'
surcharge_or_simplified_regime
Selection
default=SurchargeOrSimplifiedRegimeType.N.value
selection=[(SurchargeOrSimplifiedRegimeType.N.value, 'N'), (SurchargeOrSimplifiedRegimeType.S.value, 'S')]
string='Surcharge or Simplified Regime'
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
type
Selection
selection=[(TicketBaiTaxType.service.value, 'Service'), (TicketBaiTaxType.provision_of_goods.value, 'Provision of goods')]
No public methods.
state
Selection
required=True
selection=[(TicketBaiResponseState.RECEIVED.value, 'Received'), (TicketBaiResponseState.REJECTED.value, 'Rejected'), (TicketBaiResponseState.REQUEST_ERROR.value, 'Request error'), (TicketBaiResponseState.BUILD_ERROR.value, 'Build error')]
tbai_invoice_id
Many2one → tbai.invoice
comodel_name='tbai.invoice'
ondelete='cascade'
required=True
tbai_response_message_ids
One2many → tbai.response.message
comodel_name='tbai.response.message'
inverse_name='tbai_response_id'
xml
Binary
attachment=True
string='XML Response'
xml_fname
Char
prepare_tbai_api_error_values(self, msg, **kwargs)
prepare_tbai_response_values(self, response, **kwargs)
code
Char
required=True
description
Char
required=True
translate=True
tbai_response_id
Many2one → tbai.response
comodel_name='tbai.response'
ondelete='cascade'
required=True
create(self, vals)
name_get(self)
name
Char
required=True
string='Tax Agency'
qr_base_url
Char
compute='_compute_ticketbai_version'
store=True
string='QR Base URL'
rest_url_cancellation
Char
compute='_compute_ticketbai_version'
store=True
string='REST API URL for Invoice Cancellations'
rest_url_invoice
Char
compute='_compute_ticketbai_version'
store=True
string='REST API URL for Invoices'
sign_file_hash
Char
required=True
string='Sign File HASH'
sign_file_url
Char
required=True
string='Sign File URL'
tax_agency_version_ids
One2many → tbai.tax.agency.version
comodel_name='tbai.tax.agency.version'
inverse_name='tbai_tax_agency_id'
test_qr_base_url
Char
compute='_compute_ticketbai_version'
store=True
string='QR Base URL'
test_rest_url_cancellation
Char
compute='_compute_ticketbai_version'
store=True
string='Test - REST API URL for Invoice Cancellations'
test_rest_url_invoice
Char
compute='_compute_ticketbai_version'
store=True
string='Test - REST API URL for Invoices'
version
Char
compute='_compute_ticketbai_version'
store=True
string='TicketBAI version'
get_current_version(self)
date_from
Date
string='Date from'
date_to
Date
string='Date to'
qr_base_url
Char
required=True
string='QR Base URL'
rest_url_cancellation
Char
string='REST API URL for Invoice Cancellations'
rest_url_invoice
Char
string='REST API URL for Invoices'
tbai_tax_agency_id
Many2one → tbai.tax.agency
comodel_name='tbai.tax.agency'
ondelete='restrict'
required=True
test_qr_base_url
Char
string='Test - QR Base URL'
test_rest_url_cancellation
Char
string='Test - REST API URL for Invoice Cancellations'
test_rest_url_invoice
Char
string='Test - REST API URL for Invoices'
version
Char
required=True
string='TicketBAI version'
No public methods.