TicketBAI

l10n_es_ticketbai
REPOSITORY
REPOSITORYOCA/l10n-spain
GIT
GIThttps://github.com/OCA/l10n-spain.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-spain/tree/16.0/l10n_es_ticketbai
VERSION
VERSION 1.2.1
CATEGORY
CATEGORYAccounting & Finance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Binovo
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Binovo
COMMITTERS
COMMITTERSPedro M. Baeza, Weblate, OCA-git-bot, oca-ci, Aritz Olea, bilbonet, r.perez
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-spain
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:53:40
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/account-financial-reporting:
    - account_tax_balance
OCA/l10n-spain:
    - l10n_es_aeat
    - l10n_es_ticketbai_api
OCA/server-ux:
    - date_range
odoo/odoo:
    - base_vat
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - l10n_es
    - base_iban
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES unidecode
qrcode
xmlsig
xmltodict
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (20)
XML IDNameModelTypeStatus
report_invoice_document report_invoice_document ir.ui.view qweb Inherits account.report_invoice_document
tbai_account_fiscal_position_template_view_form account.fiscal.position.template.view.form account.fiscal.position.template form New
tbai_account_fiscal_position_template_view_search account.fiscal.position.template.view.search account.fiscal.position.template search New
tbai_account_fiscal_position_template_view_tree account.fiscal.position.template.view.tree account.fiscal.position.template tree New
tbai_invoice_form tbai.invoice.view.form tbai.invoice form New
tbai_invoice_search tbai.invoice.view.search tbai.invoice search New
tbai_invoice_tree tbai.invoice.view.tree tbai.invoice tree New
tbai_tax_map_view_form tbai.tax.map.view.form tbai.tax.map form New
tbai_tax_map_view_tree tbai.tax.map.view.tree tbai.tax.map tree New
tbai_vat_exemption_key_view_search tbai.vat.exemption.key.view.search tbai.vat.exemption.key search New
tbai_vat_exemption_key_view_tree tbai.vat.exemption.key.view.tree tbai.vat.exemption.key tree New
tbai_vat_regime_key_view_search tbai.vat.regime.key.view.search tbai.vat.regime.key search New
tbai_vat_regime_key_view_tree tbai.vat.regime.key.view.tree tbai.vat.regime.key tree New
view_account_journal_form_inherit account.journal xpath Inherits account.view_account_journal_form
view_account_position_form_inherit account.fiscal.position.form account.fiscal.position page Inherits account.view_account_position_form
view_account_position_template_form_inherit account.fiscal.position.template.form account.fiscal.position.template field Inherits account.view_account_position_template_form
view_company_form_inherit res.company.form.inherit res.company field Inherits l10n_es_ticketbai_api.view_company_form_inherit
view_move_form_inherit account.move.form account.move xpath Inherits account.view_move_form
view_partner_property_form_inherit res.partner group Inherits account.view_partner_property_form
view_ticketbai_info_form tbai.info.form tbai.info form New
Models touched (20)

New fields (0)

No new fields.

Public methods (1)
  • create_record_with_xmlid(self, company, template, model, vals)

New fields (4)
  • tbai_vat_exemption_ids One2many → account.fp.tbai.tax
    comodel_name='account.fp.tbai.tax' inverse_name='position_id'
  • tbai_vat_regime_key Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime Key'
  • tbai_vat_regime_key2 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime 2nd Key'
  • tbai_vat_regime_key3 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime 3rd Key'
Public methods (0)

No public methods.

New fields (4)
  • tbai_vat_exemption_ids One2many → account.fp.tbai.tax_template
    comodel_name='account.fp.tbai.tax_template' inverse_name='position_id'
  • tbai_vat_regime_key Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime Key'
  • tbai_vat_regime_key2 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime 2nd Key'
  • tbai_vat_regime_key3 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime 3rd Key'
Public methods (0)

No public methods.

New fields (3)
  • position_id Many2one → account.fiscal.position
    comodel_name='account.fiscal.position' ondelete='cascade' required=True string='Fiscal Position'
  • tax_id Many2one → account.tax
    comodel_name='account.tax' ondelete='cascade' required=True string='Tax'
  • tbai_vat_exemption_key Many2one → tbai.vat.exemption.key
    comodel_name='tbai.vat.exemption.key' ondelete='restrict' required=True string='VAT Exemption Key'
Public methods (0)

No public methods.

New fields (3)
  • position_id Many2one → account.fiscal.position.template
    comodel_name='account.fiscal.position.template' ondelete='cascade' required=True string='Fiscal Position'
  • tax_id Many2one → account.tax.template
    comodel_name='account.tax.template' ondelete='cascade' required=True string='Tax'
  • tbai_vat_exemption_key Many2one → tbai.vat.exemption.key
    comodel_name='tbai.vat.exemption.key' ondelete='restrict' required=True string='VAT Exemption Key'
Public methods (0)

No public methods.

New fields (2)
  • tbai_enabled Boolean
    readonly=True related='company_id.tbai_enabled'
  • tbai_send_invoice Boolean
    default=True string='Send TicketBAI invoices to tax agency'
Public methods (3)
  • onchange_refund_sequence(self)
    @api.onchange('refund_sequence')
  • onchange_tbai_send_invoice(self)
    @api.onchange('tbai_send_invoice')
  • onchange_type(self)
    @api.onchange('type')

New fields (18)
  • tbai_cancellation_id Many2one → tbai.invoice
    comodel_name='tbai.invoice' copy=False string='TicketBAI Cancellation'
  • tbai_cancellation_ids One2many → tbai.invoice
    comodel_name='tbai.invoice' inverse_name='cancelled_invoice_id' string='TicketBAI Cancellations'
  • tbai_date_operation Datetime
    copy=False args: 'Operation Date'
  • tbai_datetime_invoice Datetime
    compute='_compute_tbai_datetime_invoice' copy=False store=True
  • tbai_description_operation Text
    compute='_compute_tbai_description' copy=False default='/' store=True args: 'Operation Description'
  • tbai_enabled Boolean
    readonly=True related='company_id.tbai_enabled'
  • tbai_invoice_id Many2one → tbai.invoice
    comodel_name='tbai.invoice' copy=False string='TicketBAI Invoice'
  • tbai_invoice_ids One2many → tbai.invoice
    comodel_name='tbai.invoice' inverse_name='invoice_id' string='TicketBAI Invoices'
  • tbai_refund_key Selection
    copy=False 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')]
  • tbai_refund_origin_ids One2many → tbai.invoice.refund.origin
    comodel_name='tbai.invoice.refund.origin' inverse_name='account_refund_invoice_id' string='TicketBAI Refund Origin References'
  • tbai_refund_type Selection
    copy=False selection=[(RefundType.differences.value, 'By differences')]
  • tbai_response_ids Many2many → tbai.response
    comodel_name='tbai.response' compute='_compute_tbai_response_ids' string='Responses'
  • tbai_send_invoice Boolean
    related='journal_id.tbai_send_invoice'
  • tbai_substitute_simplified_invoice Boolean
    copy=False args: 'Substitute Simplified Invoice'
  • tbai_substitution_invoice_id Many2one → account.move
    comodel_name='account.move' copy=False help='Link between a validated Customer Invoice and its substitute.'
  • tbai_vat_regime_key Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=True default=_default_tbai_vat_regime_key string='VAT Regime Key'
  • tbai_vat_regime_key2 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=True string='VAT Regime 2nd Key'
  • tbai_vat_regime_key3 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=True string='VAT Regime 3rd Key'
Public methods (18)
  • button_cancel(self)
  • copy_data(self, default=None)
  • create(self, vals_list)
    @api.model_create_multi
  • onchange_fiscal_position_id_tbai_vat_regime_key(self)
    @api.onchange('fiscal_position_id', 'partner_id')
  • onchange_tbai_reversed_entry_id(self)
    @api.onchange('reversed_entry_id')
  • tbai_get_value_base_rectificada(self)
  • tbai_get_value_cuota_rectificada(self)
  • tbai_get_value_factura_emitida_sustitucion_simplificada(self)
  • tbai_get_value_fecha_exp_factura(self)
  • tbai_get_value_fecha_operacion(self)
  • tbai_get_value_hora_exp_factura(self)
  • tbai_get_value_num_factura(self)
  • tbai_get_value_retencion_soportada(self)
  • tbai_get_value_serie_factura(self)
  • tbai_get_value_simplified_invoice(self)
  • tbai_is_invoice_refund(self)
  • tbai_prepare_cancellation_values(self)
  • tbai_prepare_invoice_values(self)

New fields (0)

No new fields.

Public methods (4)
  • tbai_get_price_unit(self)
  • tbai_get_value_cantidad(self)
  • tbai_get_value_descuento(self, price_unit)
  • tbai_get_value_importe_total(self)

New fields (0)

No new fields.

Public methods (1)
  • reverse_moves(self)

New fields (0)

No new fields.

Public methods (1)
  • resequence(self)

New fields (0)

No new fields.

Public methods (17)
  • tbai_es_entrega(self)
  • tbai_es_prestacion_servicios(self)
  • tbai_get_amount_total_company(self, invoice_id)
  • tbai_get_associated_re_tax(self, invoice_id)
  • tbai_get_exemption_cause(self, invoice_id)
  • tbai_get_invoice_amount_for_tax_group(self, invoice_id)
  • tbai_get_invoice_base_balace_for_tax_group(self, invoice_id)
  • tbai_get_value_base_imponible(self, invoice_id)
  • tbai_get_value_causa(self, invoice_id)
  • tbai_get_value_cuota_impuesto(self, invoice_id)
  • tbai_get_value_cuota_recargo_equiv(self, invoice_id)
  • tbai_get_value_op_recargo_equiv_o_reg_simpl(self, invoice_id)
  • tbai_get_value_tax_type(self)
  • tbai_get_value_tipo_no_exenta(self)
  • tbai_get_value_tipo_recargo_equiv(self, invoice_id)
  • tbai_is_subject_to_tax(self)
  • tbai_is_tax_exempted(self)

New fields (2)
  • tbai_p12 Binary
    compute='_compute_tbai_p12'
  • tbai_p12_friendlyname Char
    args: 'Alias'
Public methods (1)
  • get_p12(self)
    Because for signing the XML file is needed a PKCS #12 and the passphrase is not available in the AEAT certificate, create a new one and set the certificate and its private key from the stored files. :return: A PKCS #12 archive

New fields (0)

No new fields.

Public methods (1)
  • get_keys(self)

New fields (5)
  • tbai_aeat_certificate_id Many2one → l10n.es.aeat.certificate
    comodel_name='l10n.es.aeat.certificate' copy=False domain="[('state', '=', 'active'), ('company_id', '=', id)]" string='AEAT Certificate'
  • tbai_description Char
    help="The description for invoices. Only used when the field TicketBAI Description Method is 'Fixed'." size=250 string='TicketBAI Description'
  • tbai_description_method Selection
    default='manual' help="Method for the TicketBAI invoices description, can be one of these:\n- Automatic: the description will be the join of the invoice lines description\n- Fixed: the description write on the below field 'TBAI Description'\n- Manual (by default): It will be necessary to manually enter the description on each invoice" required=True selection=[('auto', 'Automatic'), ('fixed', 'Fixed'), ('manual', 'Manual')] string='TicketBAI Description Method'
  • tbai_protected_data Boolean
    default=False args: 'Protected Data'
  • tbai_protected_data_txt Text
    default='Información protegida por el artículo 9 Reglamento 679/2016' translate=True args: 'Substitution Text'
Public methods (6)
  • get_fps_from_templates(self, fp_templates)
    Return company fiscal positions that match the given templates.
  • onchange_tbai_enabled_unset_tbai_aeat_certificate_id(self)
    @api.onchange('tbai_enabled')
  • tbai_certificate_get_p12(self)
  • tbai_certificate_get_private_key(self)
  • tbai_certificate_get_public_key(self)
  • write(self, vals)

New fields (6)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> readonly=True string='Company'
  • developer_id Many2one → res.partner
    comodel_name='res.partner' readonly=True related='company_id.tbai_developer_id' string='Developer'
  • device_serial_number Char
    compute='_compute_device_serial_number'
  • name Char
    compute='_compute_name' string='Developer name'
  • software Char
    compute='_compute_software'
  • tbai_enabled Boolean
    default=<expr>
Public methods (0)

No public methods.

New fields (2)
  • cancelled_invoice_id Many2one → account.move
    comodel_name='account.move'
  • invoice_id Many2one → account.move
    comodel_name='account.move'
Public methods (3)
  • cancel_and_recreate(self)
  • get_ticketbai_api(self, **kwargs)
  • send(self, **kwargs)

New fields (4)
  • account_refund_invoice_id Many2one → account.move
    comodel_name='account.move' domain=[('type', '=', 'out_refund')] required=True
  • expedition_date Date
    required=True
  • number Char
    help='The number of the invoice name e.g. if the invoice name is INV/2021/00001 then the number is 00001' required=True
  • number_prefix Char
    default='' help='Number prefix of this invoice name e.g. if the invoice name is INV/2021/00001 then the prefix is INV/2021/, ending back slash included'
Public methods (0)

No public methods.

New fields (3)
  • code Char
    required=True
  • name Char
    required=True
  • tax_template_ids Many2many → account.tax.template
    comodel_name='account.tax.template' string='Taxes'
Public methods (0)

No public methods.

New fields (2)
  • code Char
    required=True
  • name Char
    required=True
Public methods (1)
  • name_get(self)

New fields (2)
  • code Char
    required=True
  • name Char
    required=True
Public methods (1)
  • name_get(self)
REPOSITORY
REPOSITORYOCA/l10n-spain
GIT
GIThttps://github.com/OCA/l10n-spain.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-spain/tree/15.0/l10n_es_ticketbai
VERSION
VERSION 1.5.0
CATEGORY
CATEGORYAccounting & Finance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Binovo
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Binovo
COMMITTERS
COMMITTERSJairo Llopis, Enric Tobella, OCA Transbot, Miquel Raïch, Weblate, OCA-git-bot, Oihane Crucelaegui, oca-ci, Aritz Olea, xAdrianC, bilbonet, r.perez
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-spain
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:46:29
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/account-financial-reporting:
    - account_tax_balance
OCA/l10n-spain:
    - l10n_es_aeat
    - l10n_es_ticketbai_api
OCA/server-ux:
    - date_range
odoo/odoo:
    - base_vat
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - l10n_es
    - base_iban
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES cryptography
unidecode
qrcode
xmlsig
xmltodict
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (20)
XML IDNameModelTypeStatus
report_invoice_document report_invoice_document ir.ui.view qweb Inherits account.report_invoice_document
tbai_account_fiscal_position_template_view_form account.fiscal.position.template.view.form account.fiscal.position.template form New
tbai_account_fiscal_position_template_view_search account.fiscal.position.template.view.search account.fiscal.position.template search New
tbai_account_fiscal_position_template_view_tree account.fiscal.position.template.view.tree account.fiscal.position.template tree New
tbai_invoice_form tbai.invoice.view.form tbai.invoice form New
tbai_invoice_search tbai.invoice.view.search tbai.invoice search New
tbai_invoice_tree tbai.invoice.view.tree tbai.invoice tree New
tbai_tax_map_view_form tbai.tax.map.view.form tbai.tax.map form New
tbai_tax_map_view_tree tbai.tax.map.view.tree tbai.tax.map tree New
tbai_vat_exemption_key_view_search tbai.vat.exemption.key.view.search tbai.vat.exemption.key search New
tbai_vat_exemption_key_view_tree tbai.vat.exemption.key.view.tree tbai.vat.exemption.key tree New
tbai_vat_regime_key_view_search tbai.vat.regime.key.view.search tbai.vat.regime.key search New
tbai_vat_regime_key_view_tree tbai.vat.regime.key.view.tree tbai.vat.regime.key tree New
view_account_journal_form_inherit account.journal xpath Inherits account.view_account_journal_form
view_account_position_form_inherit account.fiscal.position.form account.fiscal.position page Inherits account.view_account_position_form
view_account_position_template_form_inherit account.fiscal.position.template.form account.fiscal.position.template field Inherits account.view_account_position_template_form
view_company_form_inherit res.company.form.inherit res.company field Inherits l10n_es_ticketbai_api.view_company_form_inherit
view_move_form_inherit account.move.form account.move xpath Inherits account.view_move_form
view_partner_property_form_inherit res.partner group Inherits account.view_partner_property_form
view_ticketbai_info_form tbai.info.form tbai.info form New
Models touched (21)

New fields (0)

No new fields.

Public methods (1)
  • create_record_with_xmlid(self, company, template, model, vals)

New fields (4)
  • tbai_vat_exemption_ids One2many → account.fp.tbai.tax
    comodel_name='account.fp.tbai.tax' inverse_name='position_id'
  • tbai_vat_regime_key Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime Key'
  • tbai_vat_regime_key2 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime 2nd Key'
  • tbai_vat_regime_key3 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime 3rd Key'
Public methods (0)

No public methods.

New fields (4)
  • tbai_vat_exemption_ids One2many → account.fp.tbai.tax_template
    comodel_name='account.fp.tbai.tax_template' inverse_name='position_id'
  • tbai_vat_regime_key Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime Key'
  • tbai_vat_regime_key2 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime 2nd Key'
  • tbai_vat_regime_key3 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime 3rd Key'
Public methods (0)

No public methods.

New fields (3)
  • position_id Many2one → account.fiscal.position
    comodel_name='account.fiscal.position' ondelete='cascade' required=True string='Fiscal Position'
  • tax_id Many2one → account.tax
    comodel_name='account.tax' ondelete='cascade' required=True string='Tax'
  • tbai_vat_exemption_key Many2one → tbai.vat.exemption.key
    comodel_name='tbai.vat.exemption.key' ondelete='restrict' required=True string='VAT Exemption Key'
Public methods (0)

No public methods.

New fields (3)
  • position_id Many2one → account.fiscal.position.template
    comodel_name='account.fiscal.position.template' ondelete='cascade' required=True string='Fiscal Position'
  • tax_id Many2one → account.tax.template
    comodel_name='account.tax.template' ondelete='cascade' required=True string='Tax'
  • tbai_vat_exemption_key Many2one → tbai.vat.exemption.key
    comodel_name='tbai.vat.exemption.key' ondelete='restrict' required=True string='VAT Exemption Key'
Public methods (0)

No public methods.

New fields (2)
  • tbai_enabled Boolean
    readonly=True related='company_id.tbai_enabled'
  • tbai_send_invoice Boolean
    default=True string='Send TicketBAI invoices to tax agency'
Public methods (3)
  • onchange_refund_sequence(self)
    @api.onchange('refund_sequence')
  • onchange_tbai_send_invoice(self)
    @api.onchange('tbai_send_invoice')
  • onchange_type(self)
    @api.onchange('type')

New fields (18)
  • tbai_cancellation_id Many2one → tbai.invoice
    comodel_name='tbai.invoice' copy=False string='TicketBAI Cancellation'
  • tbai_cancellation_ids One2many → tbai.invoice
    comodel_name='tbai.invoice' inverse_name='cancelled_invoice_id' string='TicketBAI Cancellations'
  • tbai_date_operation Datetime
    copy=False args: 'Operation Date'
  • tbai_datetime_invoice Datetime
    compute='_compute_tbai_datetime_invoice' copy=False store=True
  • tbai_description_operation Text
    compute='_compute_tbai_description' copy=False default='/' store=True args: 'Operation Description'
  • tbai_enabled Boolean
    readonly=True related='company_id.tbai_enabled'
  • tbai_invoice_id Many2one → tbai.invoice
    comodel_name='tbai.invoice' copy=False string='TicketBAI Invoice'
  • tbai_invoice_ids One2many → tbai.invoice
    comodel_name='tbai.invoice' inverse_name='invoice_id' string='TicketBAI Invoices'
  • tbai_refund_key Selection
    copy=False 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')]
  • tbai_refund_origin_ids One2many → tbai.invoice.refund.origin
    comodel_name='tbai.invoice.refund.origin' inverse_name='account_refund_invoice_id' string='TicketBAI Refund Origin References'
  • tbai_refund_type Selection
    copy=False selection=[(RefundType.differences.value, 'By differences')]
  • tbai_response_ids Many2many → tbai.response
    comodel_name='tbai.response' compute='_compute_tbai_response_ids' string='Responses'
  • tbai_send_invoice Boolean
    related='journal_id.tbai_send_invoice'
  • tbai_substitute_simplified_invoice Boolean
    copy=False args: 'Substitute Simplified Invoice'
  • tbai_substitution_invoice_id Many2one → account.move
    comodel_name='account.move' copy=False help='Link between a validated Customer Invoice and its substitute.'
  • tbai_vat_regime_key Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=True default=_default_tbai_vat_regime_key string='VAT Regime Key'
  • tbai_vat_regime_key2 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=True string='VAT Regime 2nd Key'
  • tbai_vat_regime_key3 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=True string='VAT Regime 3rd Key'
Public methods (18)
  • button_cancel(self)
  • copy_data(self, default=None)
  • create(self, vals)
    @api.model
  • onchange_fiscal_position_id_tbai_vat_regime_key(self)
    @api.onchange('fiscal_position_id', 'partner_id')
  • onchange_tbai_reversed_entry_id(self)
    @api.onchange('reversed_entry_id')
  • tbai_get_value_base_rectificada(self)
  • tbai_get_value_cuota_rectificada(self)
  • tbai_get_value_factura_emitida_sustitucion_simplificada(self)
  • tbai_get_value_fecha_exp_factura(self)
  • tbai_get_value_fecha_operacion(self)
  • tbai_get_value_hora_exp_factura(self)
  • tbai_get_value_num_factura(self)
  • tbai_get_value_retencion_soportada(self)
  • tbai_get_value_serie_factura(self)
  • tbai_get_value_simplified_invoice(self)
  • tbai_is_invoice_refund(self)
  • tbai_prepare_cancellation_values(self)
  • tbai_prepare_invoice_values(self)

New fields (0)

No new fields.

Public methods (4)
  • tbai_get_price_unit(self)
  • tbai_get_value_cantidad(self)
  • tbai_get_value_descuento(self, price_unit)
  • tbai_get_value_importe_total(self)

New fields (0)

No new fields.

Public methods (1)
  • reverse_moves(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • resequence(self)

New fields (0)

No new fields.

Public methods (17)
  • tbai_es_entrega(self)
  • tbai_es_prestacion_servicios(self)
  • tbai_get_amount_total_company(self, invoice_id)
  • tbai_get_associated_re_tax(self, invoice_id)
  • tbai_get_exemption_cause(self, invoice_id)
  • tbai_get_invoice_amount_for_tax_group(self, invoice_id)
  • tbai_get_invoice_base_balace_for_tax_group(self, invoice_id)
  • tbai_get_value_base_imponible(self, invoice_id)
  • tbai_get_value_causa(self, invoice_id)
  • tbai_get_value_cuota_impuesto(self, invoice_id)
  • tbai_get_value_cuota_recargo_equiv(self, invoice_id)
  • tbai_get_value_op_recargo_equiv_o_reg_simpl(self, invoice_id)
  • tbai_get_value_tax_type(self)
  • tbai_get_value_tipo_no_exenta(self)
  • tbai_get_value_tipo_recargo_equiv(self, invoice_id)
  • tbai_is_subject_to_tax(self)
  • tbai_is_tax_exempted(self)

New fields (2)
  • tbai_p12 Binary
    compute='_compute_tbai_p12'
  • tbai_p12_friendlyname Char
    args: 'Alias'
Public methods (1)
  • get_p12(self)
    Because for signing the XML file is needed a PKCS #12 and the passphrase is not available in the AEAT certificate, create a new one and set the certificate and its private key from the stored files. :return: A PKCS #12 archive

New fields (0)

No new fields.

Public methods (1)
  • get_keys(self)

New fields (5)
  • tbai_aeat_certificate_id Many2one → l10n.es.aeat.certificate
    comodel_name='l10n.es.aeat.certificate' copy=False domain="[('state', '=', 'active'), ('company_id', '=', id)]" string='AEAT Certificate'
  • tbai_description Char
    help="The description for invoices. Only used when the field TicketBAI Description Method is 'Fixed'." size=250 string='TicketBAI Description'
  • tbai_description_method Selection
    default='manual' help="Method for the TicketBAI invoices description, can be one of these:\n- Automatic: the description will be the join of the invoice lines description\n- Fixed: the description write on the below field 'TBAI Description'\n- Manual (by default): It will be necessary to manually enter the description on each invoice" required=True selection=[('auto', 'Automatic'), ('fixed', 'Fixed'), ('manual', 'Manual')] string='TicketBAI Description Method'
  • tbai_protected_data Boolean
    default=False args: 'Protected Data'
  • tbai_protected_data_txt Text
    default='Información protegida por el artículo 9 Reglamento 679/2016' translate=True args: 'Substitution Text'
Public methods (6)
  • get_fps_from_templates(self, fp_templates)
    Return company fiscal positions that match the given templates.
  • onchange_tbai_enabled_unset_tbai_aeat_certificate_id(self)
    @api.onchange('tbai_enabled')
  • tbai_certificate_get_p12(self)
  • tbai_certificate_get_private_key(self)
  • tbai_certificate_get_public_key(self)
  • write(self, vals)

New fields (6)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> readonly=True string='Company'
  • developer_id Many2one → res.partner
    comodel_name='res.partner' readonly=True related='company_id.tbai_developer_id' string='Developer'
  • device_serial_number Char
    compute='_compute_device_serial_number'
  • name Char
    compute='_compute_name' string='Developer name'
  • software Char
    compute='_compute_software'
  • tbai_enabled Boolean
    default=<expr>
Public methods (0)

No public methods.

New fields (2)
  • cancelled_invoice_id Many2one → account.move
    comodel_name='account.move'
  • invoice_id Many2one → account.move
    comodel_name='account.move'
Public methods (3)
  • cancel_and_recreate(self)
  • get_ticketbai_api(self, **kwargs)
  • send(self, **kwargs)

New fields (4)
  • account_refund_invoice_id Many2one → account.move
    comodel_name='account.move' domain=[('type', '=', 'out_refund')] required=True
  • expedition_date Date
    required=True
  • number Char
    help='The number of the invoice name e.g. if the invoice name is INV/2021/00001 then the number is 00001' required=True
  • number_prefix Char
    default='' help='Number prefix of this invoice name e.g. if the invoice name is INV/2021/00001 then the prefix is INV/2021/, ending back slash included'
Public methods (0)

No public methods.

New fields (3)
  • code Char
    required=True
  • name Char
    required=True
  • tax_template_ids Many2many → account.tax.template
    comodel_name='account.tax.template' string='Taxes'
Public methods (0)

No public methods.

New fields (2)
  • code Char
    required=True
  • name Char
    required=True
Public methods (1)
  • name_get(self)

New fields (2)
  • code Char
    required=True
  • name Char
    required=True
Public methods (1)
  • name_get(self)
REPOSITORY
REPOSITORYOCA/l10n-spain
GIT
GIThttps://github.com/OCA/l10n-spain.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-spain/tree/14.0/l10n_es_ticketbai
VERSION
VERSION 2.9.4
CATEGORY
CATEGORYAccounting & Finance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Binovo
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Binovo
COMMITTERS
COMMITTERSPedro M. Baeza, mreficent, OCA Transbot, Miquel Raïch, oca-travis, Weblate, OCA-git-bot, Oihane Crucelaegui, JesusVMayor, oca-ci, Enrique Martín, Aritz Olea, xAdrianC, Miquel Alzanillas, luciaavanzosc
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-spain
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:40:48
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/account-financial-reporting:
    - account_tax_balance
OCA/l10n-spain:
    - l10n_es_aeat
    - l10n_es_ticketbai_api
OCA/server-ux:
    - date_range
odoo/odoo:
    - base_vat
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - l10n_es
    - base_iban
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES cryptography<39
unidecode
pyOpenSSL
qrcode
xmlsig
xmltodict
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (21)
XML IDNameModelTypeStatus
report_invoice_document report_invoice_document ir.ui.view qweb Inherits account.report_invoice_document
tbai_account_fiscal_position_template_view_form account.fiscal.position.template.view.form account.fiscal.position.template form New
tbai_account_fiscal_position_template_view_search account.fiscal.position.template.view.search account.fiscal.position.template search New
tbai_account_fiscal_position_template_view_tree account.fiscal.position.template.view.tree account.fiscal.position.template tree New
tbai_invoice_form tbai.invoice.view.form tbai.invoice form New
tbai_invoice_search tbai.invoice.view.search tbai.invoice search New
tbai_invoice_tree tbai.invoice.view.tree tbai.invoice tree New
tbai_tax_map_view_form tbai.tax.map.view.form tbai.tax.map form New
tbai_tax_map_view_tree tbai.tax.map.view.tree tbai.tax.map tree New
tbai_vat_exemption_key_view_search tbai.vat.exemption.key.view.search tbai.vat.exemption.key search New
tbai_vat_exemption_key_view_tree tbai.vat.exemption.key.view.tree tbai.vat.exemption.key tree New
tbai_vat_regime_key_view_search tbai.vat.regime.key.view.search tbai.vat.regime.key search New
tbai_vat_regime_key_view_tree tbai.vat.regime.key.view.tree tbai.vat.regime.key tree New
view_account_journal_form_inherit account.journal xpath Inherits account.view_account_journal_form
view_account_position_form_inherit account.fiscal.position.form account.fiscal.position page Inherits account.view_account_position_form
view_account_position_template_form_inherit account.fiscal.position.template.form account.fiscal.position.template field Inherits account.view_account_position_template_form
view_company_form_inherit res.company.form.inherit res.company field Inherits l10n_es_ticketbai_api.view_company_form_inherit
view_ir_sequence_form_inherit ir.sequence xpath Inherits base.sequence_view
view_move_form_inherit account.move.form account.move xpath Inherits account.view_move_form
view_partner_property_form_inherit res.partner group Inherits account.view_partner_property_form
view_ticketbai_info_form tbai.info.form tbai.info form New
Models touched (22)

New fields (0)

No new fields.

Public methods (1)
  • create_record_with_xmlid(self, company, template, model, vals)

New fields (4)
  • tbai_vat_exemption_ids One2many → account.fp.tbai.tax
    comodel_name='account.fp.tbai.tax' inverse_name='position_id'
  • tbai_vat_regime_key Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime Key'
  • tbai_vat_regime_key2 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime 2nd Key'
  • tbai_vat_regime_key3 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime 3rd Key'
Public methods (0)

No public methods.

New fields (4)
  • tbai_vat_exemption_ids One2many → account.fp.tbai.tax_template
    comodel_name='account.fp.tbai.tax_template' inverse_name='position_id'
  • tbai_vat_regime_key Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime Key'
  • tbai_vat_regime_key2 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime 2nd Key'
  • tbai_vat_regime_key3 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime 3rd Key'
Public methods (0)

No public methods.

New fields (3)
  • position_id Many2one → account.fiscal.position
    comodel_name='account.fiscal.position' ondelete='cascade' required=True string='Fiscal Position'
  • tax_id Many2one → account.tax
    comodel_name='account.tax' ondelete='cascade' required=True string='Tax'
  • tbai_vat_exemption_key Many2one → tbai.vat.exemption.key
    comodel_name='tbai.vat.exemption.key' ondelete='restrict' required=True string='VAT Exemption Key'
Public methods (0)

No public methods.

New fields (3)
  • position_id Many2one → account.fiscal.position.template
    comodel_name='account.fiscal.position.template' ondelete='cascade' required=True string='Fiscal Position'
  • tax_id Many2one → account.tax.template
    comodel_name='account.tax.template' ondelete='cascade' required=True string='Tax'
  • tbai_vat_exemption_key Many2one → tbai.vat.exemption.key
    comodel_name='tbai.vat.exemption.key' ondelete='restrict' required=True string='VAT Exemption Key'
Public methods (0)

No public methods.

New fields (3)
  • tbai_active_date Date
    default=fields.Date.to_date('2022-01-01') help='Start date for sending invoices to the tax authorities' string='TicketBAI active date'
  • tbai_enabled Boolean
    readonly=True related='company_id.tbai_enabled'
  • tbai_send_invoice Boolean
    default=True string='Send TicketBAI invoices to tax agency'
Public methods (3)
  • onchange_refund_sequence(self)
    @api.onchange('refund_sequence')
  • onchange_tbai_send_invoice(self)
    @api.onchange('tbai_send_invoice')
  • onchange_type(self)
    @api.onchange('type')

New fields (18)
  • tbai_cancellation_id Many2one → tbai.invoice
    comodel_name='tbai.invoice' copy=False string='TicketBAI Cancellation'
  • tbai_cancellation_ids One2many → tbai.invoice
    comodel_name='tbai.invoice' inverse_name='cancelled_invoice_id' string='TicketBAI Cancellations'
  • tbai_date_operation Datetime
    copy=False args: 'Operation Date'
  • tbai_datetime_invoice Datetime
    compute='_compute_tbai_datetime_invoice' copy=False store=True
  • tbai_description_operation Text
    compute='_compute_tbai_description' copy=False default='/' store=True args: 'Operation Description'
  • tbai_enabled Boolean
    readonly=True related='company_id.tbai_enabled'
  • tbai_invoice_id Many2one → tbai.invoice
    comodel_name='tbai.invoice' copy=False string='TicketBAI Invoice'
  • tbai_invoice_ids One2many → tbai.invoice
    comodel_name='tbai.invoice' inverse_name='invoice_id' string='TicketBAI Invoices'
  • tbai_refund_key Selection
    copy=False 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')]
  • tbai_refund_origin_ids One2many → tbai.invoice.refund.origin
    comodel_name='tbai.invoice.refund.origin' inverse_name='account_refund_invoice_id' string='TicketBAI Refund Origin References'
  • tbai_refund_type Selection
    copy=False selection=[(RefundType.differences.value, 'By differences')]
  • tbai_response_ids Many2many → tbai.response
    comodel_name='tbai.response' compute='_compute_tbai_response_ids' string='Responses'
  • tbai_send_invoice Boolean
    related='journal_id.tbai_send_invoice'
  • tbai_substitute_simplified_invoice Boolean
    copy=False args: 'Substitute Simplified Invoice'
  • tbai_substitution_invoice_id Many2one → account.move
    comodel_name='account.move' copy=False help='Link between a validated Customer Invoice and its substitute.'
  • tbai_vat_regime_key Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=True default=_default_tbai_vat_regime_key string='VAT Regime Key'
  • tbai_vat_regime_key2 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=True string='VAT Regime 2nd Key'
  • tbai_vat_regime_key3 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=True string='VAT Regime 3rd Key'
Public methods (18)
  • button_cancel(self)
  • copy_data(self, default=None)
  • create(self, vals)
    @api.model
  • onchange_fiscal_position_id_tbai_vat_regime_key(self)
    @api.onchange('fiscal_position_id', 'partner_id')
  • onchange_tbai_reversed_entry_id(self)
    @api.onchange('reversed_entry_id')
  • tbai_get_value_base_rectificada(self)
  • tbai_get_value_cuota_rectificada(self)
  • tbai_get_value_factura_emitida_sustitucion_simplificada(self)
  • tbai_get_value_fecha_exp_factura(self)
  • tbai_get_value_fecha_operacion(self)
  • tbai_get_value_hora_exp_factura(self)
  • tbai_get_value_num_factura(self)
  • tbai_get_value_retencion_soportada(self)
  • tbai_get_value_serie_factura(self)
  • tbai_get_value_simplified_invoice(self)
  • tbai_is_invoice_refund(self)
  • tbai_prepare_cancellation_values(self)
  • tbai_prepare_invoice_values(self)

New fields (0)

No new fields.

Public methods (4)
  • tbai_get_price_unit(self)
  • tbai_get_value_cantidad(self)
  • tbai_get_value_descuento(self, price_unit)
  • tbai_get_value_importe_total(self)

New fields (0)

No new fields.

Public methods (1)
  • reverse_moves(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • resequence(self)

New fields (0)

No new fields.

Public methods (17)
  • tbai_es_entrega(self)
  • tbai_es_prestacion_servicios(self)
  • tbai_get_amount_total_company(self, invoice_id)
  • tbai_get_associated_re_tax(self, invoice_id)
  • tbai_get_exemption_cause(self, invoice_id)
  • tbai_get_invoice_amount_for_tax_group(self, invoice_id)
  • tbai_get_invoice_base_balace_for_tax_group(self, invoice_id)
  • tbai_get_value_base_imponible(self, invoice_id)
  • tbai_get_value_causa(self, invoice_id)
  • tbai_get_value_cuota_impuesto(self, invoice_id)
  • tbai_get_value_cuota_recargo_equiv(self, invoice_id)
  • tbai_get_value_op_recargo_equiv_o_reg_simpl(self, invoice_id)
  • tbai_get_value_tax_type(self)
  • tbai_get_value_tipo_no_exenta(self)
  • tbai_get_value_tipo_recargo_equiv(self, invoice_id)
  • tbai_is_subject_to_tax(self)
  • tbai_is_tax_exempted(self)

New fields (1)
  • tbai_enabled Boolean
    readonly=True related='company_id.tbai_enabled'
Public methods (0)

No public methods.

New fields (2)
  • tbai_p12 Binary
    compute='_compute_tbai_p12'
  • tbai_p12_friendlyname Char
    args: 'Alias'
Public methods (1)
  • get_p12(self)
    Because for signing the XML file is needed a PKCS #12 and the passphrase is not available in the AEAT certificate, create a new one and set the certificate and its private key from the stored files. :return: A PKCS #12 archive

New fields (0)

No new fields.

Public methods (1)
  • get_keys(self)

New fields (5)
  • tbai_aeat_certificate_id Many2one → l10n.es.aeat.certificate
    comodel_name='l10n.es.aeat.certificate' copy=False domain="[('state', '=', 'active'), ('company_id', '=', id)]" string='AEAT Certificate'
  • tbai_description Char
    help="The description for invoices. Only used when the field TicketBAI Description Method is 'Fixed'." size=250 string='TicketBAI Description'
  • tbai_description_method Selection
    default='manual' help="Method for the TicketBAI invoices description, can be one of these:\n- Automatic: the description will be the join of the invoice lines description\n- Fixed: the description write on the below field 'TBAI Description'\n- Manual (by default): It will be necessary to manually enter the description on each invoice" required=True selection=[('auto', 'Automatic'), ('fixed', 'Fixed'), ('manual', 'Manual')] string='TicketBAI Description Method'
  • tbai_protected_data Boolean
    default=False args: 'Protected Data'
  • tbai_protected_data_txt Text
    default='Información protegida por el artículo 9 Reglamento 679/2016' translate=True args: 'Substitution Text'
Public methods (6)
  • get_fps_from_templates(self, fp_templates)
    Return company fiscal positions that match the given templates.
  • onchange_tbai_enabled_unset_tbai_aeat_certificate_id(self)
    @api.onchange('tbai_enabled')
  • tbai_certificate_get_p12(self)
  • tbai_certificate_get_private_key(self)
  • tbai_certificate_get_public_key(self)
  • write(self, vals)

New fields (6)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> readonly=True string='Company'
  • developer_id Many2one → res.partner
    comodel_name='res.partner' readonly=True related='company_id.tbai_developer_id' string='Developer'
  • device_serial_number Char
    compute='_compute_device_serial_number' args: 'Device Serial Number'
  • name Char
    compute='_compute_name' string='Developer name'
  • software Char
    compute='_compute_software' string='Software'
  • tbai_enabled Boolean
    default=<expr>
Public methods (0)

No public methods.

New fields (2)
  • cancelled_invoice_id Many2one → account.move
    comodel_name='account.move'
  • invoice_id Many2one → account.move
    comodel_name='account.move'
Public methods (3)
  • cancel_and_recreate(self)
  • get_ticketbai_api(self, **kwargs)
  • send(self, **kwargs)

New fields (4)
  • account_refund_invoice_id Many2one → account.move
    comodel_name='account.move' domain=[('type', '=', 'out_refund')] required=True
  • expedition_date Date
    required=True
  • number Char
    help='The number of the invoice name e.g. if the invoice name is INV/2021/00001 then the number is 00001' required=True
  • number_prefix Char
    default='' help='Number prefix of this invoice name e.g. if the invoice name is INV/2021/00001 then the prefix is INV/2021/, ending back slash included'
Public methods (0)

No public methods.

New fields (3)
  • code Char
    required=True string='Code'
  • name Char
    required=True string='Name'
  • tax_template_ids Many2many → account.tax.template
    comodel_name='account.tax.template' string='Taxes'
Public methods (0)

No public methods.

New fields (2)
  • code Char
    required=True string='Code'
  • name Char
    required=True args: 'Name'
Public methods (1)
  • name_get(self)

New fields (2)
  • code Char
    required=True string='Code'
  • name Char
    required=True args: 'Name'
Public methods (1)
  • name_get(self)
REPOSITORY
REPOSITORYOCA/l10n-spain
GIT
GIThttps://github.com/OCA/l10n-spain.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-spain/tree/13.0/l10n_es_ticketbai
VERSION
VERSION 1.10.5
CATEGORY
CATEGORYAccounting & Finance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Binovo
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Binovo
COMMITTERS
COMMITTERSPedro M. Baeza, GitHub, mreficent, oca-travis, OCA-git-bot, Oihane Crucelaegui, JesusVMayor, AdrianC, Aritz Olea, xAdrianC, bilbonet
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-spain
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:34:09
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/account-financial-reporting:
    - account_tax_balance
OCA/l10n-spain:
    - l10n_es_aeat
    - l10n_es_ticketbai_api
OCA/server-ux:
    - date_range
odoo/odoo:
    - base_vat
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - l10n_es
    - base_iban
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES OpenSSL
pyOpenSSL
unidecode
cryptography<39
qrcode
requests_pkcs12
xmlsig
xmltodict
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (21)
XML IDNameModelTypeStatus
report_invoice_document report_invoice_document ir.ui.view qweb Inherits account.report_invoice_document
tbai_account_fiscal_position_template_view_form account.fiscal.position.template.view.form account.fiscal.position.template form New
tbai_account_fiscal_position_template_view_search account.fiscal.position.template.view.search account.fiscal.position.template search New
tbai_account_fiscal_position_template_view_tree account.fiscal.position.template.view.tree account.fiscal.position.template tree New
tbai_invoice_form tbai.invoice.view.form tbai.invoice form New
tbai_invoice_search tbai.invoice.view.search tbai.invoice search New
tbai_invoice_tree tbai.invoice.view.tree tbai.invoice tree New
tbai_tax_map_view_form tbai.tax.map.view.form tbai.tax.map form New
tbai_tax_map_view_tree tbai.tax.map.view.tree tbai.tax.map tree New
tbai_vat_exemption_key_view_search tbai.vat.exemption.key.view.search tbai.vat.exemption.key search New
tbai_vat_exemption_key_view_tree tbai.vat.exemption.key.view.tree tbai.vat.exemption.key tree New
tbai_vat_regime_key_view_search tbai.vat.regime.key.view.search tbai.vat.regime.key search New
tbai_vat_regime_key_view_tree tbai.vat.regime.key.view.tree tbai.vat.regime.key tree New
view_account_journal_form_inherit account.journal xpath Inherits account.view_account_journal_form
view_account_position_form_inherit account.fiscal.position.form account.fiscal.position page Inherits account.view_account_position_form
view_account_position_template_form_inherit account.fiscal.position.template.form account.fiscal.position.template field Inherits account.view_account_position_template_form
view_company_form_inherit res.company.form.inherit res.company field Inherits l10n_es_ticketbai_api.view_company_form_inherit
view_ir_sequence_form_inherit ir.sequence xpath Inherits base.sequence_view
view_move_form_inherit account.move.form account.move page Inherits account.view_move_form
view_partner_property_form_inherit res.partner group Inherits account.view_partner_property_form
view_ticketbai_info_form tbai.info.form tbai.info form New
Models touched (21)

New fields (0)

No new fields.

Public methods (1)
  • create_record_with_xmlid(self, company, template, model, vals)

New fields (4)
  • tbai_vat_exemption_ids One2many → account.fp.tbai.tax
    comodel_name='account.fp.tbai.tax' inverse_name='position_id'
  • tbai_vat_regime_key Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime Key'
  • tbai_vat_regime_key2 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime 2nd Key'
  • tbai_vat_regime_key3 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime 3rd Key'
Public methods (0)

No public methods.

New fields (4)
  • tbai_vat_exemption_ids One2many → account.fp.tbai.tax_template
    comodel_name='account.fp.tbai.tax_template' inverse_name='position_id'
  • tbai_vat_regime_key Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime Key'
  • tbai_vat_regime_key2 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime 2nd Key'
  • tbai_vat_regime_key3 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime 3rd Key'
Public methods (0)

No public methods.

New fields (3)
  • position_id Many2one → account.fiscal.position
    comodel_name='account.fiscal.position' ondelete='cascade' required=True string='Fiscal Position'
  • tax_id Many2one → account.tax
    comodel_name='account.tax' ondelete='cascade' required=True string='Tax'
  • tbai_vat_exemption_key Many2one → tbai.vat.exemption.key
    comodel_name='tbai.vat.exemption.key' ondelete='restrict' required=True string='VAT Exemption Key'
Public methods (0)

No public methods.

New fields (3)
  • position_id Many2one → account.fiscal.position.template
    comodel_name='account.fiscal.position.template' ondelete='cascade' required=True string='Fiscal Position'
  • tax_id Many2one → account.tax.template
    comodel_name='account.tax.template' ondelete='cascade' required=True string='Tax'
  • tbai_vat_exemption_key Many2one → tbai.vat.exemption.key
    comodel_name='tbai.vat.exemption.key' ondelete='restrict' required=True string='VAT Exemption Key'
Public methods (0)

No public methods.

New fields (2)
  • tbai_enabled Boolean
    readonly=True related='company_id.tbai_enabled'
  • tbai_send_invoice Boolean
    default=True string='Send TicketBAI invoices to tax agency'
Public methods (3)
  • onchange_refund_sequence(self)
    @api.onchange('refund_sequence')
  • onchange_tbai_send_invoice(self)
    @api.onchange('tbai_send_invoice')
  • onchange_type(self)
    @api.onchange('type')

New fields (18)
  • tbai_cancellation_id Many2one → tbai.invoice
    comodel_name='tbai.invoice' copy=False string='TicketBAI Cancellation'
  • tbai_cancellation_ids One2many → tbai.invoice
    comodel_name='tbai.invoice' inverse_name='cancelled_invoice_id' string='TicketBAI Cancellations'
  • tbai_date_operation Datetime
    copy=False args: 'Operation Date'
  • tbai_datetime_invoice Datetime
    compute='_compute_tbai_datetime_invoice' copy=False store=True
  • tbai_description_operation Text
    compute='_compute_tbai_description' copy=False default='/' store=True args: 'Operation Description'
  • tbai_enabled Boolean
    readonly=True related='company_id.tbai_enabled'
  • tbai_invoice_id Many2one → tbai.invoice
    comodel_name='tbai.invoice' copy=False string='TicketBAI Invoice'
  • tbai_invoice_ids One2many → tbai.invoice
    comodel_name='tbai.invoice' inverse_name='invoice_id' string='TicketBAI Invoices'
  • tbai_refund_key Selection
    copy=False 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')]
  • tbai_refund_origin_ids One2many → tbai.invoice.refund.origin
    comodel_name='tbai.invoice.refund.origin' inverse_name='account_refund_invoice_id' string='TicketBAI Refund Origin References'
  • tbai_refund_type Selection
    copy=False selection=[(RefundType.differences.value, 'By differences')]
  • tbai_response_ids Many2many → tbai.response
    comodel_name='tbai.response' compute='_compute_tbai_response_ids' string='Responses'
  • tbai_send_invoice Boolean
    related='journal_id.tbai_send_invoice'
  • tbai_substitute_simplified_invoice Boolean
    copy=False args: 'Substitute Simplified Invoice'
  • tbai_substitution_invoice_id Many2one → account.move
    comodel_name='account.move' copy=False help='Link between a validated Customer Invoice and its substitute.'
  • tbai_vat_regime_key Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=True default=_default_tbai_vat_regime_key string='VAT Regime Key'
  • tbai_vat_regime_key2 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=True string='VAT Regime 2nd Key'
  • tbai_vat_regime_key3 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=True string='VAT Regime 3rd Key'
Public methods (19)
  • button_cancel(self)
  • copy_data(self, default=None)
  • create(self, vals)
    @api.model
  • onchange_fiscal_position_id_tbai_vat_regime_key(self)
    @api.onchange('fiscal_position_id', 'partner_id')
  • onchange_tbai_reversed_entry_id(self)
    @api.onchange('reversed_entry_id')
  • post(self)
  • tbai_get_value_base_rectificada(self)
  • tbai_get_value_cuota_rectificada(self)
  • tbai_get_value_factura_emitida_sustitucion_simplificada(self)
  • tbai_get_value_fecha_exp_factura(self)
  • tbai_get_value_fecha_operacion(self)
  • tbai_get_value_hora_exp_factura(self)
  • tbai_get_value_num_factura(self)
  • tbai_get_value_retencion_soportada(self)
  • tbai_get_value_serie_factura(self)
  • tbai_get_value_simplified_invoice(self)
  • tbai_is_invoice_refund(self)
  • tbai_prepare_cancellation_values(self)
  • tbai_prepare_invoice_values(self)

New fields (0)

No new fields.

Public methods (4)
  • tbai_get_price_unit(self)
  • tbai_get_value_cantidad(self)
  • tbai_get_value_descuento(self, price_unit)
  • tbai_get_value_importe_total(self)

New fields (0)

No new fields.

Public methods (1)
  • reverse_moves(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (18)
  • tbai_es_entrega(self)
  • tbai_es_prestacion_servicios(self)
  • tbai_get_amount_total_company(self, invoice_id)
  • tbai_get_associated_re_tax(self, invoice_id)
  • tbai_get_exemption_cause(self, invoice_id)
  • tbai_get_invoice_amount_for_tax_group(self, invoice_id)
  • tbai_get_invoice_base_balace_for_tax_group(self, invoice_id)
  • tbai_get_value_base_imponible(self, invoice_id)
  • tbai_get_value_causa(self, invoice_id)
  • tbai_get_value_cuota_impuesto(self, invoice_id)
  • tbai_get_value_cuota_recargo_equiv(self, invoice_id)
  • tbai_get_value_op_recargo_equiv_o_reg_simpl(self, invoice_id)
  • tbai_get_value_tax_type(self)
  • tbai_get_value_tipo_no_exenta(self)
  • tbai_get_value_tipo_recargo_equiv(self, invoice_id)
  • tbai_is_not_tax_exempted(self)
  • tbai_is_subject_to_tax(self)
  • tbai_is_tax_exempted(self)

New fields (1)
  • tbai_enabled Boolean
    readonly=True related='company_id.tbai_enabled'
Public methods (0)

No public methods.

New fields (2)
  • tbai_p12 Binary
    compute='_compute_tbai_p12'
  • tbai_p12_friendlyname Char
    args: 'Alias'
Public methods (1)
  • get_p12(self)
    Because for signing the XML file is needed a PKCS #12 and the passphrase is not available in the AEAT certificate, create a new one and set the certificate and its private key from the stored files. :return: A PKCS #12 archive

New fields (0)

No new fields.

Public methods (1)
  • get_keys(self)

New fields (5)
  • tbai_aeat_certificate_id Many2one → l10n.es.aeat.certificate
    comodel_name='l10n.es.aeat.certificate' copy=False domain="[('state', '=', 'active'), ('company_id', '=', id)]" string='AEAT Certificate'
  • tbai_description Char
    help="The description for invoices. Only used when the field TicketBAI Description Method is 'Fixed'." size=250 string='TicketBAI Description'
  • tbai_description_method Selection
    default='manual' help="Method for the TicketBAI invoices description, can be one of these:\n- Automatic: the description will be the join of the invoice lines description\n- Fixed: the description write on the below field 'TBAI Description'\n- Manual (by default): It will be necessary to manually enter the description on each invoice" required=True selection=[('auto', 'Automatic'), ('fixed', 'Fixed'), ('manual', 'Manual')] string='TicketBAI Description Method'
  • tbai_protected_data Boolean
    default=False args: 'Protected Data'
  • tbai_protected_data_txt Text
    default='Información protegida por el artículo 9 Reglamento 679/2016' translate=True args: 'Substitution Text'
Public methods (6)
  • get_fps_from_templates(self, fp_templates)
    Return company fiscal positions that match the given templates.
  • onchange_tbai_enabled_unset_tbai_aeat_certificate_id(self)
    @api.onchange('tbai_enabled')
  • tbai_certificate_get_p12(self)
  • tbai_certificate_get_private_key(self)
  • tbai_certificate_get_public_key(self)
  • write(self, vals)

New fields (6)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> readonly=True string='Company'
  • developer_id Many2one → res.partner
    comodel_name='res.partner' readonly=True related='company_id.tbai_developer_id' string='Developer'
  • device_serial_number Char
    compute='_compute_device_serial_number' args: 'Device Serial Number'
  • name Char
    compute='_compute_name' string='Developer name'
  • software Char
    compute='_compute_software' string='Software'
  • tbai_enabled Boolean
    default=<expr>
Public methods (0)

No public methods.

New fields (2)
  • cancelled_invoice_id Many2one → account.move
    comodel_name='account.move'
  • invoice_id Many2one → account.move
    comodel_name='account.move'
Public methods (3)
  • cancel_and_recreate(self)
  • get_ticketbai_api(self, **kwargs)
  • send(self, **kwargs)

New fields (4)
  • account_refund_invoice_id Many2one → account.move
    comodel_name='account.move' domain=[('type', '=', 'out_refund')] required=True
  • expedition_date Char
    help='Expected string date format: %dd-%mm-%yyyy' required=True
  • number Char
    help='The number of the invoice name e.g. if the invoice name is INV/2021/00001 then the number is 00001' required=True
  • number_prefix Char
    default='' help='Number prefix of this invoice name e.g. if the invoice name is INV/2021/00001 then the prefix is INV/2021/, ending back slash included'
Public methods (0)

No public methods.

New fields (3)
  • code Char
    required=True string='Code'
  • name Char
    required=True string='Name'
  • tax_template_ids Many2many → account.tax.template
    comodel_name='account.tax.template' string='Taxes'
Public methods (0)

No public methods.

New fields (2)
  • code Char
    required=True string='Code'
  • name Char
    required=True args: 'Name'
Public methods (1)
  • name_get(self)

New fields (2)
  • code Char
    required=True string='Code'
  • name Char
    required=True args: 'Name'
Public methods (1)
  • name_get(self)
REPOSITORY
REPOSITORYOCA/l10n-spain
GIT
GIThttps://github.com/OCA/l10n-spain.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-spain/tree/12.0/l10n_es_ticketbai
VERSION
VERSION 2.8.2
CATEGORY
CATEGORYAccounting & Finance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Binovo
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Binovo
COMMITTERS
COMMITTERSOCA Transbot, oca-travis, Weblate, OCA-git-bot, Oihane Crucelaegui, JesusVMayor, oca-ci, Aritz Olea, xAdrianC, Tu Nombre, Enrique Martin Zabalza
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-spain
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:29:13
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/account-financial-reporting:
    - account_tax_balance
OCA/l10n-spain:
    - l10n_es_aeat
    - l10n_es_ticketbai_api
OCA/server-ux:
    - date_range
odoo/odoo:
    - base_vat
    - account
    - base_setup
    - base
    - web
    - product
    - decimal_precision
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - http_routing
    - digest
    - l10n_es
    - base_iban
    - account_cancel
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES OpenSSL
requests
unidecode
zeep
cryptography
qrcode
requests_pkcs12
xmlsig
xmltodict
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (21)
XML IDNameModelTypeStatus
invoice_form_inherit account.invoice.form account.invoice xpath Inherits account.invoice_form
report_invoice_document report_invoice_document ir.ui.view qweb Inherits account.report_invoice_document
tbai_account_fiscal_position_template_view_form account.fiscal.position.template.view.form account.fiscal.position.template form New
tbai_account_fiscal_position_template_view_search account.fiscal.position.template.view.search account.fiscal.position.template search New
tbai_account_fiscal_position_template_view_tree account.fiscal.position.template.view.tree account.fiscal.position.template tree New
tbai_invoice_form tbai.invoice.view.form tbai.invoice form New
tbai_invoice_search tbai.invoice.view.search tbai.invoice search New
tbai_invoice_tree tbai.invoice.view.tree tbai.invoice tree New
tbai_tax_map_view_form tbai.tax.map.view.form tbai.tax.map form New
tbai_tax_map_view_tree tbai.tax.map.view.tree tbai.tax.map tree New
tbai_vat_exemption_key_view_search tbai.vat.exemption.key.view.search tbai.vat.exemption.key search New
tbai_vat_exemption_key_view_tree tbai.vat.exemption.key.view.tree tbai.vat.exemption.key tree New
tbai_vat_regime_key_view_search tbai.vat.regime.key.view.search tbai.vat.regime.key search New
tbai_vat_regime_key_view_tree tbai.vat.regime.key.view.tree tbai.vat.regime.key tree New
view_account_journal_form_inherit account.journal xpath Inherits account.view_account_journal_form
view_account_position_form_inherit account.fiscal.position.form account.fiscal.position page Inherits account.view_account_position_form
view_account_position_template_form_inherit account.fiscal.position.template.form account.fiscal.position.template field Inherits account.view_account_position_template_form
view_company_form_inherit res.company.form.inherit res.company field Inherits l10n_es_ticketbai_api.view_company_form_inherit
view_ir_sequence_form_inherit ir.sequence xpath Inherits base.sequence_view
view_partner_property_form_inherit res.partner group Inherits account.view_partner_property_form
view_ticketbai_info_form tbai.info.form tbai.info form New
Models touched (21)

New fields (0)

No new fields.

Public methods (1)
  • create_record_with_xmlid(self, company, template, model, vals)
    @api.multi

New fields (4)
  • tbai_vat_exemption_ids One2many → account.fp.tbai.tax
    comodel_name='account.fp.tbai.tax' inverse_name='position_id'
  • tbai_vat_regime_key Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime Key'
  • tbai_vat_regime_key2 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime 2nd Key'
  • tbai_vat_regime_key3 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime 3rd Key'
Public methods (0)

No public methods.

New fields (4)
  • tbai_vat_exemption_ids One2many → account.fp.tbai.tax_template
    comodel_name='account.fp.tbai.tax_template' inverse_name='position_id'
  • tbai_vat_regime_key Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime Key'
  • tbai_vat_regime_key2 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime 2nd Key'
  • tbai_vat_regime_key3 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime 3rd Key'
Public methods (0)

No public methods.

New fields (3)
  • position_id Many2one → account.fiscal.position
    comodel_name='account.fiscal.position' ondelete='cascade' required=True string='Fiscal Position'
  • tax_id Many2one → account.tax
    comodel_name='account.tax' ondelete='cascade' required=True string='Tax'
  • tbai_vat_exemption_key Many2one → tbai.vat.exemption.key
    comodel_name='tbai.vat.exemption.key' ondelete='restrict' required=True string='VAT Exemption Key'
Public methods (0)

No public methods.

New fields (3)
  • position_id Many2one → account.fiscal.position.template
    comodel_name='account.fiscal.position.template' ondelete='cascade' required=True string='Fiscal Position'
  • tax_id Many2one → account.tax.template
    comodel_name='account.tax.template' ondelete='cascade' required=True string='Tax'
  • tbai_vat_exemption_key Many2one → tbai.vat.exemption.key
    comodel_name='tbai.vat.exemption.key' ondelete='restrict' required=True string='VAT Exemption Key'
Public methods (0)

No public methods.

New fields (18)
  • tbai_cancellation_id Many2one → tbai.invoice
    comodel_name='tbai.invoice' copy=False string='TicketBAI Cancellation'
  • tbai_cancellation_ids One2many → tbai.invoice
    comodel_name='tbai.invoice' inverse_name='cancelled_invoice_id' string='TicketBAI Cancellations'
  • tbai_date_operation Datetime
    copy=False args: 'Operation Date'
  • tbai_datetime_invoice Datetime
    compute='_compute_tbai_datetime_invoice' copy=False store=True
  • tbai_description_operation Text
    compute='_compute_tbai_description' copy=False default='/' store=True args: 'Operation Description'
  • tbai_enabled Boolean
    readonly=True related='company_id.tbai_enabled'
  • tbai_invoice_id Many2one → tbai.invoice
    comodel_name='tbai.invoice' copy=False string='TicketBAI Invoice'
  • tbai_invoice_ids One2many → tbai.invoice
    comodel_name='tbai.invoice' inverse_name='invoice_id' string='TicketBAI Invoices'
  • tbai_refund_key Selection
    copy=False 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')]
  • tbai_refund_origin_ids One2many → tbai.invoice.refund.origin
    comodel_name='tbai.invoice.refund.origin' inverse_name='account_refund_invoice_id' string='TicketBAI Refund Origin References'
  • tbai_refund_type Selection
    copy=False selection=[(RefundType.differences.value, 'By differences')]
  • tbai_response_ids Many2many → tbai.response
    comodel_name='tbai.response' compute='_compute_tbai_response_ids' string='Responses'
  • tbai_send_invoice Boolean
    related='journal_id.tbai_send_invoice'
  • tbai_substitute_simplified_invoice Boolean
    copy=False args: 'Substitute Simplified Invoice'
  • tbai_substitution_invoice_id Many2one → account.invoice
    comodel_name='account.invoice' copy=False help='Link between a validated Customer Invoice and its substitute.'
  • tbai_vat_regime_key Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=True default=_default_tbai_vat_regime_key string='VAT Regime Key'
  • tbai_vat_regime_key2 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=True string='VAT Regime 2nd Key'
  • tbai_vat_regime_key3 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=True string='VAT Regime 3rd Key'
Public methods (19)
  • action_cancel(self)
    @api.multi
  • create(self, vals)
    @api.model
  • invoice_validate(self)
    @api.multi
  • onchange_fiscal_position_id_tbai_vat_regime_key(self)
    @api.onchange('fiscal_position_id')
  • onchange_tbai_refund_invoice_id(self)
    @api.onchange('refund_invoice_id')
  • tbai_get_value_base_rectificada(self)
  • tbai_get_value_cuota_rectificada(self)
  • tbai_get_value_factura_emitida_sustitucion_simplificada(self)
  • tbai_get_value_fecha_expedicion_factura(self)
  • tbai_get_value_fecha_operacion(self)
  • tbai_get_value_hora_expedicion_factura(self)
  • tbai_get_value_num_factura(self)
  • tbai_get_value_retencion_soportada(self)
  • tbai_get_value_serie_factura(self)
  • tbai_get_value_simplified_invoice(self)
  • tbai_is_invoice_refund(self)
  • tbai_prepare_cancellation_values(self)
  • tbai_prepare_invoice_line_values(self)
  • tbai_prepare_invoice_values(self)

New fields (0)

No new fields.

Public methods (4)
  • tbai_get_price_unit(self)
  • tbai_get_value_cantidad(self)
  • tbai_get_value_descuento(self, price_unit)
  • tbai_get_value_importe_total(self)

New fields (0)

No new fields.

Public methods (2)
  • compute_refund(self, mode='refund')
    @api.multi
  • invoice_refund(self)
    @api.multi

New fields (1)
  • tbai_vat_exemption_key Many2one → tbai.vat.exemption.key
    comodel_name='tbai.vat.exemption.key' copy=False string='TicketBAI - VAT Exemption Key'
Public methods (12)
  • tbai_es_entrega(self)
  • tbai_es_prestacion_servicios(self)
  • tbai_get_amount_total_company(self)
  • tbai_get_associated_re_tax(self)
  • tbai_get_value_base_imponible(self)
  • tbai_get_value_causa(self)
  • tbai_get_value_cuota_impuesto(self)
  • tbai_get_value_cuota_recargo_equivalencia(self)
  • tbai_get_value_op_recargo_equivalencia_o_reg_simplificado(self)
  • tbai_get_value_tax_type(self)
  • tbai_get_value_tipo_no_exenta(self)
  • tbai_get_value_tipo_recargo_equivalencia(self)

New fields (3)
  • tbai_active_date Date
    default=fields.Date.from_string('2022-01-01') help='Start date for sending invoices to the tax authorities' string='TicketBAI active date'
  • tbai_enabled Boolean
    readonly=True related='company_id.tbai_enabled'
  • tbai_send_invoice Boolean
    default=True string='Send TicketBAI invoices to tax agency'
Public methods (3)
  • onchange_refund_sequence(self)
    @api.onchange('refund_sequence')
  • onchange_tbai_send_invoice(self)
    @api.onchange('tbai_send_invoice')
  • onchange_type(self)
    @api.onchange('type')

New fields (1)
  • tbai_vat_regime_simplified Boolean
    compute='_compute_tbai_vat_regime_simplified' help='Change default value for tax individually behavior' readonly=False store=True args: 'Regime Simplified'
Public methods (3)
  • tbai_is_not_tax_exempted(self)
  • tbai_is_subject_to_tax(self)
  • tbai_is_tax_exempted(self)

New fields (1)
  • tbai_enabled Boolean
    readonly=True related='company_id.tbai_enabled'
Public methods (0)

No public methods.

New fields (2)
  • tbai_p12 Binary
    compute='_compute_tbai_p12'
  • tbai_p12_friendlyname Char
    args: 'Alias'
Public methods (1)
  • get_p12(self)
    Because for signing the XML file is needed a PKCS #12 and the passphrase is not available in the AEAT certificate, create a new one and set the certificate and its private key from the stored files. :return: A PKCS #12 archive

New fields (0)

No new fields.

Public methods (1)
  • get_keys(self)
    @api.multi

New fields (5)
  • tbai_aeat_certificate_id Many2one → l10n.es.aeat.certificate
    comodel_name='l10n.es.aeat.certificate' copy=False domain="[('state', '=', 'active'), ('company_id', '=', id)]" string='AEAT Certificate'
  • tbai_description Char
    help="The description for invoices. Only used when the field TicketBAI Description Method is 'Fixed'." size=250 string='TicketBAI Description'
  • tbai_description_method Selection
    default='manual' help="Method for the TicketBAI invoices description, can be one of these:\n- Automatic: the description will be the join of the invoice lines description\n- Fixed: the description write on the below field 'TBAI Description'\n- Manual (by default): It will be necessary to manually enter the description on each invoice" required=True selection=[('auto', 'Automatic'), ('fixed', 'Fixed'), ('manual', 'Manual')] string='TicketBAI Description Method'
  • tbai_protected_data Boolean
    default=False args: 'Protected Data'
  • tbai_protected_data_txt Text
    default='Información protegida por el artículo 9 Reglamento 679/2016' translate=True args: 'Substitution Text'
Public methods (6)
  • get_fps_from_templates(self, fp_templates)
    Return company fiscal positions that match the given templates.
  • onchange_tbai_enabled_unset_tbai_aeat_certificate_id(self)
    @api.onchange('tbai_enabled')
  • tbai_certificate_get_p12(self)
  • tbai_certificate_get_private_key(self)
  • tbai_certificate_get_public_key(self)
  • write(self, vals)

New fields (6)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> readonly=True string='Company'
  • developer_id Many2one → res.partner
    comodel_name='res.partner' readonly=True related='company_id.tbai_developer_id' string='Developer'
  • device_serial_number Char
    compute='_compute_device_serial_number' args: 'Device Serial Number'
  • name Char
    compute='_compute_name' string='Developer name'
  • software Char
    compute='_compute_software' string='Software'
  • tbai_enabled Boolean
    default=<expr>
Public methods (0)

No public methods.

New fields (2)
  • cancelled_invoice_id Many2one → account.invoice
    comodel_name='account.invoice'
  • invoice_id Many2one → account.invoice
    comodel_name='account.invoice'
Public methods (3)
  • cancel_and_recreate(self)
    @api.multi
  • get_ticketbai_api(self, **kwargs)
    @api.multi
  • send(self, **kwargs)
    @api.multi

New fields (4)
  • account_refund_invoice_id Many2one → account.invoice
    comodel_name='account.invoice' domain=[('type', '=', 'out_refund')] required=True
  • expedition_date Char
    help='Expected string date format: %dd-%mm-%yyyy' required=True
  • number Char
    help='The number of the invoice name e.g. if the invoice name is INV/2021/00001 then the number is 00001' required=True
  • number_prefix Char
    default='' help='Number prefix of this invoice name e.g. if the invoice name is INV/2021/00001 then the prefix is INV/2021/, ending back slash included'
Public methods (0)

No public methods.

New fields (3)
  • code Char
    required=True string='Code'
  • name Char
    required=True string='Name'
  • tax_template_ids Many2many → account.tax.template
    comodel_name='account.tax.template' string='Taxes'
Public methods (0)

No public methods.

New fields (2)
  • code Char
    required=True string='Code'
  • name Char
    required=True args: 'Name'
Public methods (1)
  • name_get(self)
    @api.multi

New fields (2)
  • code Char
    required=True string='Code'
  • name Char
    required=True args: 'Name'
Public methods (1)
  • name_get(self)
    @api.multi
REPOSITORY
REPOSITORYOCA/l10n-spain
GIT
GIThttps://github.com/OCA/l10n-spain.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-spain/tree/11.0/l10n_es_ticketbai
VERSION
VERSION 1.4.6
CATEGORY
CATEGORYAccounting & Finance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Binovo
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Binovo
COMMITTERS
COMMITTERSPedro M. Baeza, OCA Transbot, oca-travis, Weblate, OCA-git-bot, Luis J. Salvatierra, oca-ci, Victor Laskurain, Enrique Martín, arodriguez, Aritz Olea, Ugaitz Olaizola, Imanol Aranburu
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-spain
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:23:55
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/account-financial-reporting:
    - account_tax_balance
OCA/account-invoicing:
    - account_invoice_tax_required
OCA/l10n-spain:
    - l10n_es_aeat
    - l10n_es_aeat_certificate
    - l10n_es_ticketbai_api
OCA/server-ux:
    - date_range
odoo/odoo:
    - base_vat
    - account
    - base_setup
    - base
    - web
    - product
    - decimal_precision
    - mail
    - bus
    - web_tour
    - analytic
    - web_planner
    - portal
    - http_routing
    - l10n_es
    - base_iban
    - account_invoicing
    - account_cancel
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES OpenSSL
unidecode
cryptography
qrcode
requests_pkcs12
xmlsig
xmltodict
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (21)
XML IDNameModelTypeStatus
invoice_form_inherit account.invoice.form account.invoice xpath Inherits account.invoice_form
report_invoice_document report_invoice_document ir.ui.view qweb Inherits account.report_invoice_document
tbai_account_fiscal_position_template_view_form account.fiscal.position.template.view.form account.fiscal.position.template form New
tbai_account_fiscal_position_template_view_search account.fiscal.position.template.view.search account.fiscal.position.template search New
tbai_account_fiscal_position_template_view_tree account.fiscal.position.template.view.tree account.fiscal.position.template tree New
tbai_invoice_form tbai.invoice.view.form tbai.invoice form New
tbai_invoice_search tbai.invoice.view.search tbai.invoice search New
tbai_invoice_tree tbai.invoice.view.tree tbai.invoice tree New
tbai_tax_map_view_form tbai.tax.map.view.form tbai.tax.map form New
tbai_tax_map_view_tree tbai.tax.map.view.tree tbai.tax.map tree New
tbai_vat_exemption_key_view_search tbai.vat.exemption.key.view.search tbai.vat.exemption.key search New
tbai_vat_exemption_key_view_tree tbai.vat.exemption.key.view.tree tbai.vat.exemption.key tree New
tbai_vat_regime_key_view_search tbai.vat.regime.key.view.search tbai.vat.regime.key search New
tbai_vat_regime_key_view_tree tbai.vat.regime.key.view.tree tbai.vat.regime.key tree New
view_account_journal_form_inherit_ticketbai view_account_journal_form_inherit_ticketbai account.journal xpath Inherits account.view_account_journal_form
view_account_position_form_inherit account.fiscal.position.form account.fiscal.position page Inherits account.view_account_position_form
view_account_position_template_form_inherit account.fiscal.position.template.form account.fiscal.position.template field Inherits account.view_account_position_template_form
view_company_form_inherit res.company.form.inherit res.company field Inherits l10n_es_ticketbai_api.view_company_form_inherit
view_ir_sequence_form_inherit ir.sequence xpath Inherits base.sequence_view
view_partner_property_form_inherit res.partner group Inherits account.view_partner_property_form
view_ticketbai_info_form tbai.info.form tbai.info form New
Models touched (21)

New fields (0)

No new fields.

Public methods (1)
  • create_record_with_xmlid(self, company, template, model, vals)
    @api.multi

New fields (4)
  • tbai_vat_exemption_ids One2many → account.fp.tbai.tax
    comodel_name='account.fp.tbai.tax' inverse_name='position_id'
  • tbai_vat_regime_key Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime Key'
  • tbai_vat_regime_key2 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime 2nd Key'
  • tbai_vat_regime_key3 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime 3rd Key'
Public methods (0)

No public methods.

New fields (4)
  • tbai_vat_exemption_ids One2many → account.fp.tbai.tax_template
    comodel_name='account.fp.tbai.tax_template' inverse_name='position_id'
  • tbai_vat_regime_key Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime Key'
  • tbai_vat_regime_key2 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime 2nd Key'
  • tbai_vat_regime_key3 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=False string='VAT Regime 3rd Key'
Public methods (0)

No public methods.

New fields (3)
  • position_id Many2one → account.fiscal.position
    comodel_name='account.fiscal.position' ondelete='cascade' required=True string='Fiscal Position'
  • tax_id Many2one → account.tax
    comodel_name='account.tax' ondelete='cascade' required=True string='Tax'
  • tbai_vat_exemption_key Many2one → tbai.vat.exemption.key
    comodel_name='tbai.vat.exemption.key' ondelete='restrict' required=True string='VAT Exemption Key'
Public methods (0)

No public methods.

New fields (3)
  • position_id Many2one → account.fiscal.position.template
    comodel_name='account.fiscal.position.template' ondelete='cascade' required=True string='Fiscal Position'
  • tax_id Many2one → account.tax.template
    comodel_name='account.tax.template' ondelete='cascade' required=True string='Tax'
  • tbai_vat_exemption_key Many2one → tbai.vat.exemption.key
    comodel_name='tbai.vat.exemption.key' ondelete='restrict' required=True string='VAT Exemption Key'
Public methods (0)

No public methods.

New fields (16)
  • tbai_cancellation_id Many2one → tbai.invoice
    comodel_name='tbai.invoice' copy=False string='TicketBAI Cancellation'
  • tbai_cancellation_ids One2many → tbai.invoice
    comodel_name='tbai.invoice' inverse_name='cancelled_invoice_id' string='TicketBAI Cancellations'
  • tbai_date_operation Datetime
    copy=False args: 'Operation Date'
  • tbai_datetime_invoice Datetime
    compute='_compute_tbai_datetime_invoice' copy=False store=True
  • tbai_description_operation Text
    copy=False default='/' args: 'Operation Description'
  • tbai_enabled Boolean
    readonly=True related='company_id.tbai_enabled'
  • tbai_invoice_id Many2one → tbai.invoice
    comodel_name='tbai.invoice' copy=False string='TicketBAI Invoice'
  • tbai_invoice_ids One2many → tbai.invoice
    comodel_name='tbai.invoice' inverse_name='invoice_id' string='TicketBAI Invoices'
  • tbai_refund_key Selection
    copy=False 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')]
  • tbai_refund_origin_ids One2many → tbai.invoice.refund.origin
    comodel_name='tbai.invoice.refund.origin' inverse_name='account_refund_invoice_id' string='TicketBAI Refund Origin References'
  • tbai_refund_type Selection
    copy=False selection=[(RefundType.substitution.value, 'By substitution'), (RefundType.differences.value, 'By differences')]
  • tbai_response_ids Many2many → tbai.response
    comodel_name='tbai.response' compute='_compute_tbai_response_ids' string='Responses'
  • tbai_substitute_simplified_invoice Boolean
    copy=False args: 'Substitute Simplified Invoice'
  • tbai_vat_regime_key Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=True string='VAT Regime Key'
  • tbai_vat_regime_key2 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=True string='VAT Regime 2nd Key'
  • tbai_vat_regime_key3 Many2one → tbai.vat.regime.key
    comodel_name='tbai.vat.regime.key' copy=True string='VAT Regime 3rd Key'
Public methods (21)
  • action_cancel(self)
    @api.multi
  • create(self, vals)
    @api.model
  • invoice_validate(self)
    @api.multi
  • onchange_fiscal_position_id_tbai_vat_regime_key(self)
    @api.onchange('fiscal_position_id')
  • onchange_tbai_refund_invoice_id(self)
    @api.onchange('refund_invoice_id')
  • onchange_tbai_refund_type(self)
    @api.onchange('tbai_refund_type')
  • split_invoice_number(self)
  • tbai_get_value_base_rectificada(self)
  • tbai_get_value_cuota_rectificada(self)
  • tbai_get_value_factura_emitida_sustitucion_simplificada(self)
  • tbai_get_value_fecha_expedicion_factura(self)
  • tbai_get_value_fecha_operacion(self)
  • tbai_get_value_hora_expedicion_factura(self)
  • tbai_get_value_num_factura(self)
  • tbai_get_value_retencion_soportada(self)
  • tbai_get_value_serie_factura(self)
  • tbai_get_value_simplified_invoice(self)
  • tbai_is_invoice_refund(self)
  • tbai_prepare_cancellation_values(self)
  • tbai_prepare_invoice_values(self)
  • unlink(self)
    @api.multi

New fields (0)

No new fields.

Public methods (3)
  • tbai_get_value_cantidad(self)
  • tbai_get_value_descuento(self)
  • tbai_get_value_importe_total(self)

New fields (0)

No new fields.

Public methods (1)
  • invoice_refund(self)
    @api.multi

New fields (1)
  • tbai_vat_exemption_key Many2one → tbai.vat.exemption.key
    comodel_name='tbai.vat.exemption.key' copy=False string='TicketBAI - VAT Exemption Key'
Public methods (12)
  • tbai_es_entrega(self)
  • tbai_es_prestacion_servicios(self)
  • tbai_get_amount_total_company(self)
  • tbai_get_associated_re_tax(self)
  • tbai_get_value_base_imponible(self)
  • tbai_get_value_causa(self)
  • tbai_get_value_cuota_impuesto(self)
  • tbai_get_value_cuota_recargo_equivalencia(self)
  • tbai_get_value_op_recargo_equivalencia_o_reg_simplificado(self)
  • tbai_get_value_tax_type(self)
  • tbai_get_value_tipo_no_exenta(self)
  • tbai_get_value_tipo_recargo_equivalencia(self)

New fields (2)
  • tbai_active_date Date
    default=fields.Date.from_string('2022-01-01') help='Start date for sending invoices to the tax authorities' string='TicketBAI active date'
  • tbai_enabled Boolean
    readonly=True related='company_id.tbai_enabled'
Public methods (1)
  • onchange_tbai_active_date(self)
    @api.onchange('tbai_active_date')

New fields (0)

No new fields.

Public methods (3)
  • tbai_is_not_tax_exempted(self)
  • tbai_is_subject_to_tax(self)
  • tbai_is_tax_exempted(self)

New fields (1)
  • tbai_enabled Boolean
    readonly=True related='company_id.tbai_enabled'
Public methods (0)

No public methods.

New fields (2)
  • tbai_p12 Binary
    compute='_compute_tbai_p12'
  • tbai_p12_friendlyname Char
    args: 'Alias'
Public methods (1)
  • get_p12(self)
    Because for signing the XML file is needed a PKCS #12 and the passphrase is not available in the AEAT certificate, create a new one and set the certificate and its private key from the stored files. :return: A PKCS #12 archive

New fields (0)

No new fields.

Public methods (1)
  • get_keys(self)
    @api.multi

New fields (3)
  • tbai_aeat_certificate_id Many2one → l10n.es.aeat.certificate
    comodel_name='l10n.es.aeat.certificate' copy=False domain="[('state', '=', 'active'), ('company_id', '=', id)]" string='AEAT Certificate'
  • tbai_protected_data Boolean
    default=False args: 'Protected Data'
  • tbai_protected_data_txt Text
    default='Information protected by Article 9 Regulation 679/2016' translate=True args: 'Substitution Text'
Public methods (6)
  • get_fps_from_templates(self, fp_templates)
    Return company fiscal positions that match the given templates.
  • onchange_tbai_enabled_unset_tbai_aeat_certificate_id(self)
    @api.onchange('tbai_enabled')
  • tbai_certificate_get_p12(self)
  • tbai_certificate_get_private_key(self)
  • tbai_certificate_get_public_key(self)
  • write(self, vals)

New fields (6)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> readonly=True string='Company'
  • developer_id Many2one → res.partner
    comodel_name='res.partner' readonly=True related='company_id.tbai_developer_id' string='Developer'
  • device_serial_number Char
    compute='_compute_device_serial_number' args: 'Device Serial Number'
  • name Char
    compute='_compute_name' string='Developer'
  • software Char
    compute='_compute_software' string='Software'
  • tbai_enabled Boolean
    default=<expr>
Public methods (0)

No public methods.

New fields (2)
  • cancelled_invoice_id Many2one → account.invoice
    comodel_name='account.invoice'
  • invoice_id Many2one → account.invoice
    comodel_name='account.invoice'
Public methods (3)
  • cancel_and_recreate(self)
    @api.multi
  • get_ticketbai_api(self, **kwargs)
    @api.multi
  • send(self, **kwargs)
    @api.multi

New fields (4)
  • account_refund_invoice_id Many2one → account.invoice
    comodel_name='account.invoice' domain=[('type', '=', 'out_refund')] required=True
  • expedition_date Date
    required=True
  • number Char
    help='The number of the invoice name e.g. if the invoice name is INV/2021/00001 then the number is 00001' required=True
  • number_prefix Char
    default='' help='Number prefix of this invoice name e.g. if the invoice name is INV/2021/00001 then the prefix is INV/2021/, ending back slash included'
Public methods (0)

No public methods.

New fields (3)
  • code Char
    required=True string='Code'
  • name Char
    required=True string='Name'
  • tax_template_ids Many2many → account.tax.template
    comodel_name='account.tax.template' string='Taxes'
Public methods (0)

No public methods.

New fields (2)
  • code Char
    required=True string='Code'
  • name Char
    required=True args: 'Name'
Public methods (1)
  • name_get(self)
    @api.multi

New fields (2)
  • code Char
    required=True string='Code'
  • name Char
    required=True args: 'Name'
Public methods (1)
  • name_get(self)
    @api.multi