Repository
OCA/l10n-spain · module folder · Try on Runboat
Module version
1.0.1
Category
Accounting
Folder size
0.86 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/l10n-spain
Last tracking update
2026-08-07 09:06:22
Authors
Odoo Community Association (OCA), Tecnativa, PRAXYA, ForgeFlow
Maintainers
Odoo Community Association (OCA), Tecnativa, PRAXYA, ForgeFlow
Committers
Emilio Pascual, Weblate, OCA-git-bot, oca-ci, Angel Rivas
Odoo dependencies
OCA/account-financial-reporting:
OCA/l10n-spain:
OCA/reporting-engine:
OCA/server-ux:
odoo/odoo:
- web
- bus
- uom
Python dependencies
unidecode, xlrd, xlsxwriter
System dependencies
None
Required by
None
Description
Módulo que calcula los libros de IVA e IRPF español.

Esto módulo introduce el menú "Libros de IVA y del IRPF" en Contabilidad -\> Informe
-\> Declaraciones AEAT.

Es posible visualizar e imprimir por separado:

- Libro Registro de Facturas Emitidas
- Libro Registro de Facturas Recibidas

Es posible exportar los registros a archivo con extensión xlsx.

En el modo de visualización de los informes es posible navegar a los
asientos contables relacionados con la factura.

Code Analysis

Views touched (22)
XML IDNameModelTypeStatus
l10n_es_aeat_vat_book_map_lines_view_tree aeat.vat.book.map.lines.view.tree aeat.vat.book.map.line list New
l10n_es_vat_book.vat_book_contact l10n_es_vat_book.vat_book_contact ir.ui.view qweb New
l10n_es_vat_book.vat_book_dates l10n_es_vat_book.vat_book_dates ir.ui.view qweb New
l10n_es_vat_book.vat_book_invoices_head l10n_es_vat_book.vat_book_invoices_head ir.ui.view qweb New
l10n_es_vat_book.vat_book_line l10n_es_vat_book.vat_book_line ir.ui.view qweb New
l10n_es_vat_book.vat_book_summary l10n_es_vat_book.vat_book_summary ir.ui.view qweb New
l10n_es_vat_book.vat_book_tax_summary l10n_es_vat_book.vat_book_tax_summary ir.ui.view qweb New
l10n_es_vat_book.vat_book_taxes_head l10n_es_vat_book.vat_book_taxes_head ir.ui.view qweb New
report_vat_book_invoices_issued_document report_vat_book_invoices_issued_document ir.ui.view qweb New
report_vat_book_invoices_issued_html report_vat_book_invoices_issued_html ir.ui.view qweb New
report_vat_book_invoices_issued_pdf report_vat_book_invoices_issued_pdf ir.ui.view qweb New
report_vat_book_invoices_received_document report_vat_book_invoices_received_document ir.ui.view qweb New
report_vat_book_invoices_received_html report_vat_book_invoices_received_html ir.ui.view qweb New
report_vat_book_invoices_received_pdf report_vat_book_invoices_received_pdf ir.ui.view qweb New
view_l10n_es_vat_book_form l10n_es.vat.book.form l10n.es.vat.book form Inherits l10n_es_aeat.view_l10n_es_aeat_report_form
view_l10n_es_vat_book_tree l10n_es.vat.book.tree l10n.es.vat.book tree Inherits l10n_es_aeat.view_l10n_es_aeat_report_tree
view_vat_book_line_form view.l10n_es_vat_book_line.form l10n.es.vat.book.line form New
view_vat_book_line_tree view.l10n_es_vat_book_line.tree l10n.es.vat.book.line list New
view_vat_book_summary_form view.l10n_es_vat_book_summary.form l10n.es.vat.book.summary form New
view_vat_book_summary_tree view.l10n_es_vat_book_summary.tree l10n.es.vat.book.summary list New
view_vat_book_tax_summary_form view.l10n_es_vat_book_tax_summary.form l10n.es.vat.book.tax.summary form New
view_vat_book_tax_summary_tree view.l10n_es_vat_book_tax_summary.tree l10n.es.vat.book.tax.summary list New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (7)

New fields (8)
  • book_type Selection
    selection=[('issued', 'Issued'), ('received', 'Received')]
  • excluded_account_xmlid_id Many2one → l10n.es.aeat.map.tax.line.account
    comodel_name='l10n.es.aeat.map.tax.line.account' help='Journal items with this account will be excluded' string='Tax Account Restriction'
  • fee_amount_xlsx_column Char
    string='Base xlsx column'
  • fee_type_xlsx_column Char
    string='Type xlsx column'
  • name Char
  • special_tax_group Selection
    help='Special tax group as R.Eq, IRPF, etc' selection=_selection_special_tax_group string='Special group'
  • tax_agency_ids Many2many → aeat.tax.agency
    string='Tax Agency' args: 'aeat.tax.agency'
  • tax_xmlid_ids Many2many → l10n.es.aeat.map.tax.line.tax
    comodel_name='l10n.es.aeat.map.tax.line.tax' string='Taxes'
Public methods (2)
  • get_accounts_for_company(self, company)
    Obtain the accounts corresponding to the line according the given company.
  • get_taxes_for_company(self, company)
    Obtain the taxes corresponding to this line according the given company.

New fields (16)
  • auto_renumber Boolean
    args: 'Auto renumber invoices received'
  • calculation_date Date
  • error_count Integer
    compute='_compute_error_count'
  • issued_line_ids One2many → l10n.es.vat.book.line
    comodel_name='l10n.es.vat.book.line' copy=False domain=[('line_type', '=', 'issued')] inverse_name='vat_book_id' readonly=True string='Issued invoices'
  • issued_summary_ids One2many → l10n.es.vat.book.summary
    comodel_name='l10n.es.vat.book.summary' domain=[('book_type', '=', 'issued')] inverse_name='vat_book_id' readonly=True string='Issued Summary'
  • issued_tax_summary_ids One2many → l10n.es.vat.book.tax.summary
    comodel_name='l10n.es.vat.book.tax.summary' domain=[('book_type', '=', 'issued')] inverse_name='vat_book_id' readonly=True string='Issued Tax Summary'
  • line_ids One2many → l10n.es.vat.book.line
    comodel_name='l10n.es.vat.book.line' copy=False inverse_name='vat_book_id' readonly=True string='Issued/Received invoices'
  • number Char
    default='vat_book' readonly=True
  • received_line_ids One2many → l10n.es.vat.book.line
    comodel_name='l10n.es.vat.book.line' copy=False domain=[('line_type', '=', 'received')] inverse_name='vat_book_id' readonly=True string='Received invoices'
  • received_summary_ids One2many → l10n.es.vat.book.summary
    comodel_name='l10n.es.vat.book.summary' domain=[('book_type', '=', 'received')] inverse_name='vat_book_id' readonly=True string='Received Summary'
  • received_tax_summary_ids One2many → l10n.es.vat.book.tax.summary
    comodel_name='l10n.es.vat.book.tax.summary' domain=[('book_type', '=', 'received')] inverse_name='vat_book_id' readonly=True string='Received Tax Summary'
  • rectification_issued_line_ids One2many → l10n.es.vat.book.line
    comodel_name='l10n.es.vat.book.line' copy=False domain=[('line_type', '=', 'rectification_issued')] inverse_name='vat_book_id' readonly=True string='Issued Refund Invoices'
  • rectification_received_line_ids One2many → l10n.es.vat.book.line
    comodel_name='l10n.es.vat.book.line' copy=False domain=[('line_type', '=', 'rectification_received')] inverse_name='vat_book_id' readonly=True string='Received Refund Invoices'
  • summary_ids One2many → l10n.es.vat.book.summary
    comodel_name='l10n.es.vat.book.summary' inverse_name='vat_book_id' readonly=True string='Summary'
  • tax_summary_ids One2many → l10n.es.vat.book.tax.summary
    comodel_name='l10n.es.vat.book.tax.summary' inverse_name='vat_book_id' readonly=True string='Tax Summary'
  • vat_settlement_period Selection
    default='monthly' required=True selection=[('monthly', 'Monthly'), ('quarterly', 'Quarterly')]
Public methods (12)
  • button_confirm(self)
  • calculate(self)
    Funcion call from vat_book
  • create_vat_book_lines(self, move_lines, line_type, taxes)
  • export_xlsx(self)
  • get_book_line_key(self, move_line)
  • get_book_line_tax_key(self, move_line, tax)
  • get_pos_partner_ids(self)
  • get_report_file_name(self)
  • get_special_taxes_dic(self)
    @ormcache('self.id')
  • upsert_book_line_tax(self, move_line, vat_book_line, implied_taxes)
  • view_issued_invoices(self)
  • view_received_invoices(self)

New fields (15)
  • base_amount Float
    string='Base'
  • entry_number Integer
  • exception_text Char
  • external_ref Char
    args: 'External Reference'
  • invoice_date Date
  • line_type Selection
    selection=[('issued', 'Issued'), ('received', 'Received'), ('rectification_issued', 'Refund Issued'), ('rectification_received', 'Refund Received')]
  • move_id Many2one → account.move
    comodel_name='account.move' string='Invoice'
  • move_id Many2one → account.move
    comodel_name='account.move' string='Journal Entry'
  • partner_id Many2one → res.partner
    comodel_name='res.partner' string='Empresa'
  • ref Char
    args: 'Reference'
  • special_tax_group Selection
    help='Special tax group as R.Eq, IRPF, etc' selection=_selection_special_tax_group string='Special group'
  • tax_line_ids One2many → l10n.es.vat.book.line.tax
    comodel_name='l10n.es.vat.book.line.tax' copy=False inverse_name='vat_book_line_id' string='Tax Lines'
  • total_amount Float
    string='Total'
  • vat_book_id Many2one → l10n.es.vat.book
    comodel_name='l10n.es.vat.book' string='Vat Book id'
  • vat_number Char
    string='NIF'
Public methods (0)

No public methods.

New fields (13)
  • base_amount Float
    string='Base'
  • base_move_line_ids Many2many → account.move.line
    comodel_name='account.move.line' relation='account_move_line_l10n_es_vat_book_line_tax_base_rel' string='Move Lines (Base)'
  • deductible_amount Float
  • move_line_ids Many2many → account.move.line
    comodel_name='account.move.line' string='Move Lines'
  • special_tax_amount Float
    string='Special Tax fee'
  • special_tax_group Selection
    help='Special tax group as R.Eq, IRPF, etc' selection=[('req', 'R.Eq.'), ('irpf', 'IRPF')] string='Special group'
  • special_tax_id Many2one → account.tax
    comodel_name='account.tax' string='Special Tax'
  • tax_amount Float
    string='Tax fee'
  • tax_id Many2one → account.tax
    comodel_name='account.tax' string='Tax'
  • tax_rate Float
    compute='_compute_tax_rate' string='Tax Rate (%)'
  • total_amount Float
    compute='_compute_total_amount' store=True string='Total'
  • total_amount_special_include Float
    compute='_compute_total_amount_special_include' store=True string='Total w/Special'
  • vat_book_line_id Many2one → l10n.es.vat.book.line
    comodel_name='l10n.es.vat.book.line' index=True ondelete='cascade' required=True
Public methods (0)

No public methods.

New fields (6)
  • base_amount Float
    readonly=True
  • book_type Selection
    selection=[('issued', 'Issued'), ('received', 'Received')]
  • special_tax_group Selection
    help='Special tax group as R.Eq, IRPF, etc' selection=_selection_special_tax_group string='Special group'
  • tax_amount Float
    readonly=True
  • total_amount Float
    readonly=True
  • vat_book_id Many2one → l10n.es.vat.book
    comodel_name='l10n.es.vat.book' string='Vat Book id'
Public methods (0)

No public methods.

New fields (3)
  • base_move_line_ids Many2many → account.move.line
    comodel_name='account.move.line' relation='account_move_line_l10n_es_vat_book_tax_summary_base_rel' string='Journal items (Base)'
  • move_line_ids Many2many → account.move.line
    comodel_name='account.move.line' string='Journal items'
  • tax_id Many2one → account.tax
    comodel_name='account.tax' ondelete='cascade' required=True string='Account Tax'
Public methods (2)
  • view_move_lines_base(self)
  • view_move_lines_tax(self)

New fields (0)

No new fields.

Public methods (6)
  • create_issued_sheet(self, workbook, book, draft_export)
  • create_received_sheet(self, workbook, book, draft_export)
  • fill_issued_row_data(self, sheet, row, line, tax_line, with_total, draft_export)
    Fill issued data
  • fill_received_row_data(self, sheet, row, line, tax_line, with_total, draft_export)
    Fill received data
  • format_boe_date(self, date)
  • generate_xlsx_report(self, workbook, data, objects)
    Create vat book xlsx in BOE format

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…