OdooWiki OCA HUB

Intrastat Product Declaration for Spain

l10n_es_intrastat_report folder_open OCA/l10n-spain open_in_new
Intrastat License: AGPL-3

This module implements the Spanish Intrastat reporting.

The report can be reviewed and corrected where needed before the creation of the csv file for the declaration.

auto_awesome What this module does

AI-generated from the code · Odoo 19.0

Adds the Spanish Intrastat product declaration to Odoo: it collects the right invoices, adds Spanish-specific fields (province/state, customer VAT, incoterm), and exports the declaration as a CSV file for the AEAT.

This module adapts Odoo's generic Intrastat product declaration to Spanish requirements. It only works when the company's country is Spain; otherwise it stops with an error message.

What users get: - When the declaration lines are computed, the module adds the Spanish province ("Intrastat State") of the operation, the incoterm, and, for dispatches from 2022 onwards, the customer's VAT number. If that VAT number is missing, a warning is noted on the declaration (except for private-consumer fiscal positions). - The province is taken from the warehouse partner for sales, from the destination location for purchases, and falls back to the company's province. - For arrivals, both supplier invoices and customer credit notes are collected; for dispatches, customer invoices and supplier credit notes. - The declaration lines group transactions by province and, for dispatches from 2022, by customer VAT. Weights and amounts are summed, and a weight of 1 is used when the total is zero.

Where it appears: - Extra columns and fields on the Intrastat computation and declaration line screens (province, customer VAT). - The incoterm becomes mandatory when the reporting level is "extended". - The declaration can be exported as a CSV file (semicolon-separated, Spanish number format) named after the period, and as an Excel report that includes a VAT column for dispatches from 2022.

It also adds Spanish transaction codes and a wizard, offered during configuration, that imports Spanish HS product codes from a bundled file, including their Intrastat units.

Models and fields (7)
  • stock.location · extends an existing model
  • account.chart.template · extends an existing model
  • intrastat.product.declaration · new model
  • l10n.es.intrastat.code.import · new model
  • intrastat.product.computation.line · extends an existing modelpartner_vat (Customer VAT), intrastat_state_id (Intrastat State)
  • intrastat.product.declaration.line · extends an existing modelpartner_vat (Customer VAT), intrastat_state_id (Intrastat State)
  • report.intrastat_product.product_declaration_xls · extends an existing model

Text generated by AI (DeepSeek) from reading the Odoo 19.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 8 confirmed, 1 with no information of 9 versions.

Sources · Odoo 13.0

Confirmed on 2026-11-03 in branch 13.0 of OCA/l10n-spain.

terminal Installation and usage

OCA documentation · Odoo 19.0

WARNING: This module conflicts with the Intrastat modules from the official enterprise addons. If you have already installed these modules, you should uninstall them before installing this module.

You need to add HS product codes for your company through the installation wizard. It's automatically launched if installing the module from the UI.

If any other installation method is used, you can go to Settings \> Technical \> Actions \> Configuration Wizards on developer mode, and launch there the wizard called "Import Spanish Product HS Codes"

The included codes are for 2023. Please check possible updates for this codes in:

This wizard also sets a sane default Intrastat transaction type for each kind of invoice at company level, but it can be changed later.

This module adds the following configuration parameters:

  • Company
  • Arrivals : Exempt, Standard or Extended
  • Dispatches : Exempt, Standard or Extended
  • Default Intrastat Transaction
  • Default Intrastat Transport Mode (Extended Declaration)
  • Default Intrastat Incoterm (Extended Declaration)
  • Warehouse
  • Intrastat State to cope with warehouses in different states The configuration of the Intrastat State on a Warehouse, requires a login belonging to the "Spanish Intrastat Product Declaration" security group.
  • Intrastat Codes, Supplementary Units, Transaction Types, Transport Modes, States Cf. menu Invoicing / Configuration / Miscellaneous / Intrastat Configuration
  • Product You can define a default Intrastat Code on the Product or the Product Category.
  • Go to Invocing \> Reporting \> Intrastat \> Spanish Intrastat Product Declaration.
  • Create a new record.
  • Select or input following data:
  • Year
  • Month
  • Type: for selecting if arrivals or dispatches.
  • Reporting level: standard or extended.
  • Action:
  • if "Nihil", no recomputation is possible and the report is considered empty.
  • if "Replace", everything is recomputed.
  • if "Append", only new lines are added.
  • Click on "Generate Lines from invoices" for populating transaction lines. You can review them on "Transactions" page of the report.
  • Click on "Generate Declaration Lines" for populating the lines that summarize transactions and will be the source for the exports. You can review them on "Declaration Lines" page.
  • Click on "Generate CSV Declaration Line" for getting the CSV for declaring the report in AEAT.
  • Click on "Excel Export" for having the information in a spreadsheet.
info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.