Repository
OCA/l10n-spain · module folder · Try on Runboat
Module version
1.2.1
Category
Accounting & Finance
Folder size
0.4 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/l10n-spain
Last tracking update
2026-08-07 08:09:09
Authors
Odoo Community Association (OCA), Binovo
Maintainers
Odoo Community Association (OCA), Binovo
Committers
Pedro M. Baeza, Weblate, OCA-git-bot, oca-ci, Aritz Olea, bilbonet, r.perez
Odoo dependencies
OCA/account-financial-reporting:
OCA/l10n-spain:
OCA/server-ux:
odoo/odoo:
- web
- bus
- uom
Python dependencies
unidecode, qrcode, xmlsig, xmltodict
System dependencies
None
Required by
l10n_es_ticketbai_batuz, l10n_es_ticketbai_oss, l10n_es_ticketbai_pos
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 form Inherits account.view_account_journal_form
view_account_position_form_inherit account.fiscal.position.form account.fiscal.position form Inherits account.view_account_position_form
view_account_position_template_form_inherit account.fiscal.position.template.form account.fiscal.position.template form Inherits account.view_account_position_template_form
view_company_form_inherit res.company.form.inherit res.company form Inherits l10n_es_ticketbai_api.view_company_form_inherit
view_move_form_inherit account.move.form account.move form Inherits account.view_move_form
view_partner_property_form_inherit res.partner form Inherits account.view_partner_property_form
view_ticketbai_info_form tbai.info.form tbai.info form New
HTTP endpoints (0)

No HTTP endpoints found for this module.

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)

Loading…

Loading…

Loading…

Loading…

Loading…