Repository
OCA/intrastat-extrastat · module folder · Try on Runboat
Module version
1.0.0
Category
Intrastat
Folder size
0.65 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/intrastat-extrastat
Last tracking update
2026-08-07 09:06:36
Authors
Noviat, Akretion, ACSONE SA/NV, Odoo Community Association (OCA), brain-tec AG
Maintainers
Noviat, Akretion, ACSONE SA/NV, Odoo Community Association (OCA), brain-tec AG
Committers
Maksym Yankin, Weblate, OCA-git-bot, oca-ci
Odoo dependencies
Python dependencies
xlrd, xlsxwriter
System dependencies
None
Required by
intrastat_product_hscodes_import, l10n_es_intrastat_report
Description
This module contains common objects and fields for the Intrastat Product
reporting.

It should be used in combination with country-specific Intrastat Product
reporting modules such as:

- *l10n_fr_intrastat_product*: the module for the *Déclaration d'Echange
  de Biens* (DEB) for France
- *l10n_be_intrastat_product*: the module for the Intrastat Product
  Declaration for Belgium

These country-specific modules can be found in the OCA localization for
those countries.

Code Analysis

Views touched (30)
XML IDNameModelTypeStatus
hs_code_form intrastat.hs.code.form hs.code form Inherits product_harmonized_system.hs_code_view_form
hs_code_tree intrastat.hs.code.list hs.code list Inherits product_harmonized_system.hs_code_view_tree
intrastat_product_computation_line_view_form intrastat.product.computation.line.form intrastat.product.computation.line form New
intrastat_product_computation_line_view_tree intrastat.product.computation.line.list intrastat.product.computation.line list New
intrastat_product_declaration_line_view_form intrastat.product.declaration.line.form intrastat.product.declaration.line form New
intrastat_product_declaration_line_view_tree intrastat.product.declaration.line.list intrastat.product.declaration.line list New
intrastat_product_declaration_view_form intrastat.product.declaration.form intrastat.product.declaration form New
intrastat_product_declaration_view_graph intrastat.product.declaration.graph intrastat.product.declaration graph New
intrastat_product_declaration_view_pivot intrastat.product.declaration.pivot intrastat.product.declaration pivot New
intrastat_product_declaration_view_search intrastat.product.declaration.search intrastat.product.declaration search New
intrastat_product_declaration_view_tree intrastat.product.declaration.list intrastat.product.declaration list New
intrastat_region_view_form intrastat.region.form intrastat.region form New
intrastat_region_view_search intrastat.region.search intrastat.region search New
intrastat_region_view_tree intrastat.region.list intrastat.region list New
intrastat_result_view_form intrastat.result_view_form intrastat.result.view form New
intrastat_transaction_form intrastat.transaction_form intrastat.transaction form New
intrastat_transaction_mode_search intrastat.transaction.mode.search intrastat.transaction search New
intrastat_transaction_tree intrastat.transaction_list intrastat.transaction list New
intrastat_transport_mode_form intrastat.transport.mode.form intrastat.transport_mode form New
intrastat_transport_mode_search intrastat.transport.mode.search intrastat.transport_mode search New
intrastat_transport_mode_tree intrastat.transport.mode.list intrastat.transport_mode list New
intrastat_unit_form intrastat.unit.form intrastat.unit form New
intrastat_unit_search intrastat.unit.search intrastat.unit search New
intrastat_unit_tree intrastat.unit.list intrastat.unit list New
report_invoice_document_intrastat_product report_invoice_document_intrastat_product ir.ui.view qweb Inherits account.report_invoice_document
sale_order_form intrastat.sale.order.form sale.order form Inherits sale_stock.view_order_form_inherit_sale_stock
view_move_form intrastat.invoice.form account.move form Inherits account.view_move_form
view_partner_property_form res.partner.form res.partner form Inherits account.view_partner_property_form
view_res_config_settings intrastat.account.config.settings.form res.config.settings form Inherits intrastat_base.view_intrastat_res_config_settings
view_warehouse intrastat.stock.warehouse.form stock.warehouse form Inherits stock.view_warehouse
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (19)

New fields (6)
  • intrastat Char
    related='company_id.intrastat' string='Intrastat Declaration'
  • intrastat_line_ids One2many → account.move.intrastat.line
    comodel_name='account.move.intrastat.line' inverse_name='move_id' string='Intrastat Declaration Details'
  • intrastat_transaction_id Many2one → intrastat.transaction
    check_company=True comodel_name='intrastat.transaction' domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" help='Intrastat Nature of Transaction' ondelete='restrict' string='Intrastat Transaction Type' tracking=True
  • intrastat_transport_id Many2one → intrastat.transport_mode
    comodel_name='intrastat.transport_mode' ondelete='restrict' string='Intrastat Transport Mode'
  • src_dest_country_id Many2one → res.country
    comodel_name='res.country' compute='_compute_src_dest_country_id' help='Destination country for dispatches. Origin country for arrivals.' readonly=False store=True string='Origin/Destination Country'
  • src_dest_region_id Many2one → intrastat.region
    comodel_name='intrastat.region' default=<expr> help='Origin region for dispatches, destination region for arrivals. This field is used for the Intrastat Declaration.' ondelete='restrict' string='Origin/Destination Region'
Public methods (1)
  • compute_intrastat_lines(self)
    Compute the Intrastat Lines so that they can be modified when encoding the Customer/Supplier Invoice.

New fields (9)
  • hs_code_id Many2one → hs.code
    comodel_name='hs.code' ondelete='restrict' required=True string='Intrastat Code'
  • invoice_line_id Many2one → account.move.line
    comodel_name='account.move.line' ondelete='cascade' required=True string='Invoice Line'
  • move_id Many2one → account.move
    comodel_name='account.move' ondelete='cascade' required=True string='Invoice'
  • product_id Many2one → product.product
    comodel_name='product.product' related='invoice_line_id.product_id' string='Product'
  • product_origin_country_id Many2one → res.country
    comodel_name='res.country' help="Country of origin of the product i.e. product 'made in ____'." string='Country of Origin of the Product'
  • quantity Float
    related='invoice_line_id.quantity'
  • sequence Integer
    related='invoice_line_id.sequence' store=True
  • transaction_suppl_unit_qty Float
    help='Transaction quantity in Intrastat Supplementary Unit'
  • transaction_weight Integer
    help='Transaction weight in Kg: Quantity x Product Weight'
Public methods (0)

No public methods.

New fields (1)
  • hs_code_id Many2one → hs.code
    comodel_name='hs.code' compute='_compute_hs_code_id' string='Intrastat Code'
Public methods (0)

No public methods.

New fields (1)
  • intrastat_unit_id Many2one → intrastat.unit
    comodel_name='intrastat.unit' string='Intrastat Supplementary Unit'
Public methods (0)

No public methods.

New fields (28)
  • amount_accessory_cost_company_currency Monetary
    currency_field='company_currency_id' help='Amount in company currency of the accessory costs related to this invoice line. By default, these accessory costs are computed at the pro-rata of the amount of each invoice line.' string='Accessory Costs'
  • amount_company_currency Monetary
    currency_field='company_currency_id' help='Amount in company currency to write in the declaration. Amount in company currency = amount in invoice currency converted to company currency with the rate of the invoice date.' required=True string='Fiscal Value'
  • company_country_code Char
    related='parent_id.company_id.partner_id.country_id.code' string='Company Country Code'
  • company_currency_id Many2one
    related='company_id.currency_id' string='Company currency'
  • company_id Many2one
    related='parent_id.company_id'
  • declaration_line_id Many2one → intrastat.product.declaration.line
    readonly=True string='Declaration Line' args: 'intrastat.product.declaration.line'
  • declaration_type Selection
    related='parent_id.declaration_type'
  • hs_code_id Many2one → hs.code
    string='Intrastat Code' args: 'hs.code'
  • incoterm_id Many2one → account.incoterms
    string='Incoterm' args: 'account.incoterms'
  • intrastat_unit_id Many2one → intrastat.unit
    help='Intrastat Supplementary Unit' related='hs_code_id.intrastat_unit_id' string='Suppl. Unit' args: 'intrastat.unit'
  • invoice_id Many2one → account.move
    related='invoice_line_id.move_id' string='Invoice' args: 'account.move'
  • invoice_line_id Many2one → account.move.line
    readonly=True string='Invoice Line' args: 'account.move.line'
  • parent_id Many2one → intrastat.product.declaration
    ondelete='cascade' readonly=True string='Intrastat Product Declaration' args: 'intrastat.product.declaration'
  • partner_id Many2one → res.partner
    domain=[('parent_id', '=', False)] string='Partner' args: 'res.partner'
  • product_id Many2one → product.product
    related='invoice_line_id.product_id' args: 'product.product'
  • product_origin_country_code Char
    compute='_compute_product_origin_country_code' help="2 letters ISO code of the country of origin of the product.\nSpecify 'QU' when the country of origin is unknown.\n" readonly=False size=2 store=True string='Country Code of Origin of the Product'
  • product_origin_country_id Many2one → res.country
    help="Country of origin of the product i.e. product 'made in ____'" string='Country of Origin of the Product' args: 'res.country'
  • region_code Char
    compute='_compute_region_code' readonly=False store=True
  • region_id Many2one → intrastat.region
    string='Intrastat Region' args: 'intrastat.region'
  • reporting_level Selection
    related='parent_id.reporting_level'
  • src_dest_country_code Char
    compute='_compute_src_dest_country_code' help="2 letters code of the country of origin/destination.\nSpecify 'XI' for Northern Ireland." readonly=False store=True string='Country Code'
  • src_dest_country_id Many2one → res.country
    help='Country of Origin/Destination' string='Country' args: 'res.country'
  • suppl_unit_qty Float
    digits='Product Unit of Measure' help='Supplementary Units Quantity' string='Suppl. Unit Qty'
  • transaction_code Char
    related='transaction_id.code' store=True string='Transaction Code'
  • transaction_id Many2one → intrastat.transaction
    string='Intrastat Transaction' args: 'intrastat.transaction'
  • transport_id Many2one → intrastat.transport_mode
    string='Transport Mode' args: 'intrastat.transport_mode'
  • vat Char
    compute='_compute_vat' readonly=False store=True string='VAT Number'
  • weight Float
    digits='Stock Weight' help='Net weight in Kg'
Public methods (1)
  • group_line_hashcode(self)

New fields (19)
  • action Selection
    default='replace' required=True selection='_get_action' tracking=True
  • company_country_code Char
    related='company_id.partner_id.country_id.code' store=True string='Company Country Code'
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> required=True string='Company'
  • computation_line_ids One2many → intrastat.product.computation.line
    comodel_name='intrastat.product.computation.line' inverse_name='parent_id' string='Computation Lines'
  • currency_id Many2one → res.currency
    related='company_id.currency_id' string='Currency' args: 'res.currency'
  • declaration_line_ids One2many → intrastat.product.declaration.line
    comodel_name='intrastat.product.declaration.line' inverse_name='parent_id' readonly=True string='Declaration Lines'
  • declaration_type Selection
    compute='_compute_declaration_type' precompute=True readonly=False required=True selection='_get_declaration_type' store=True string='Type' tracking=True
  • month Selection
    required=True selection=[('01', '01'), ('02', '02'), ('03', '03'), ('04', '04'), ('05', '05'), ('06', '06'), ('07', '07'), ('08', '08'), ('09', '09'), ('10', '10'), ('11', '11'), ('12', '12')]
  • note Html
    string='Notes'
  • num_decl_lines Integer
    compute='_compute_numbers' store=True string='Number of Declaration Lines' tracking=True
  • reporting_level Selection
    compute='_compute_reporting_level' readonly=False selection='_get_reporting_level' store=True
  • revision Integer
    default=1 help='Used to keep track of changes'
  • state Selection
    copy=False default='draft' readonly=True selection=[('draft', 'Draft'), ('confirmed', 'Confirmed'), ('done', 'Done')] tracking=True
  • total_amount Monetary
    compute='_compute_numbers' help='Total fiscal amount in company currency of the declaration.' store=True string='Total Fiscal Amount'
  • xml_attachment_datas Binary
    related='xml_attachment_id.datas' string='XML Export'
  • xml_attachment_id Many2one → ir.attachment
    string='XML Attachment' args: 'ir.attachment'
  • xml_attachment_name Char
    related='xml_attachment_id.name' string='XML Filename'
  • year Char
    required=True
  • year_month Char
    compute='_compute_year_month' help='Year and month of the declaration.' store=True string='Period' tracking=True
Public methods (10)
  • action_gather(self)
  • back2draft(self)
  • confirmed2done(self)
  • copy(self, default=None)
  • default_get(self, fields_list)
    @api.model
  • delete_xml(self)
  • draft2confirmed(self)
  • generate_declaration(self)
    generate declaration lines from computation lines
  • generate_xml(self)
    generate the INTRASTAT Declaration XML file
  • unlink(self)

New fields (21)
  • amount_company_currency Monetary
    currency_field='company_currency_id' help='Amount in company currency to write in the declaration. Amount in company currency = amount in invoice currency converted to company currency with the rate of the invoice date.' string='Fiscal Value'
  • company_country_code Char
    related='parent_id.company_id.partner_id.country_id.code' string='Company Country Code'
  • company_currency_id Many2one
    related='company_id.currency_id' string='Company currency'
  • company_id Many2one
    related='parent_id.company_id'
  • computation_line_ids One2many → intrastat.product.computation.line
    readonly=True string='Computation Lines' args: 'intrastat.product.computation.line', 'declaration_line_id'
  • declaration_type Selection
    related='parent_id.declaration_type'
  • hs_code_id Many2one → hs.code
    string='Intrastat Code' args: 'hs.code'
  • incoterm_id Many2one → account.incoterms
    string='Incoterm' args: 'account.incoterms'
  • intrastat_unit_id Many2one → intrastat.unit
    help='Intrastat Supplementary Unit' related='hs_code_id.intrastat_unit_id' string='Suppl. Unit' args: 'intrastat.unit'
  • line_number Integer
    readonly=True
  • parent_id Many2one → intrastat.product.declaration
    ondelete='cascade' readonly=True string='Intrastat Product Declaration' args: 'intrastat.product.declaration'
  • product_origin_country_code Char
    help="2 letters ISO code of the country of origin of the product except for the UK.\nSpecify 'XI' for Northern Ireland and 'XU' for Great Britain.\nSpecify 'QU' when the country is unknown.\n" size=2 string='Country of Origin of the Product'
  • region_code Char
  • reporting_level Selection
    related='parent_id.reporting_level'
  • src_dest_country_code Char
    help="2 letters ISO code of the country of origin/destination.\nSpecify 'XI' for Northern Ireland and 'XU' for Great Britain." string='Country Code'
  • suppl_unit_qty Integer
    help='Supplementary Units Quantity' string='Suppl. Unit Qty'
  • transaction_code Char
    related='transaction_id.code' store=True string='Transaction Code'
  • transaction_id Many2one → intrastat.transaction
    string='Intrastat Transaction' args: 'intrastat.transaction'
  • transport_id Many2one → intrastat.transport_mode
    string='Transport Mode' args: 'intrastat.transport_mode'
  • vat Char
    string='VAT Number'
  • weight Float
    digits='Stock Weight' help='Net weight in Kg'
Public methods (0)

No public methods.

New fields (5)
  • code Char
    required=True
  • company_id Many2one → res.company
    args: 'res.company'
  • country_id Many2one → res.country
    comodel_name='res.country' required=True
  • description Char
  • name Char
    translate=True
Public methods (0)

No public methods.

New fields (1)
  • note Html
    default=<expr> readonly=True string='Notes'
Public methods (0)

No public methods.

New fields (4)
  • active Boolean
    default=True
  • code Char
    required=True
  • company_id Many2one → res.company
    args: 'res.company'
  • description Text
    translate=True
Public methods (0)

No public methods.

New fields (3)
  • code Char
    required=True
  • description Char
    translate=True
  • name Char
    required=True translate=True
Public methods (0)

No public methods.

New fields (4)
  • active Boolean
    default=True
  • description Char
    required=True
  • name Char
    required=True
  • uom_id Many2one → uom.uom
    comodel_name='uom.uom' help='Select the regular Unit of Measure of Odoo that corresponds to this Intrastat Supplementary Unit.' string='Regular UoM'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (6)
  • intrastat Char
    compute='_compute_intrastat' store=True string='Intrastat Declaration'
  • intrastat_accessory_costs Boolean
    string='Include Accessory Costs in Fiscal Value of Product'
  • intrastat_arrivals Selection
    default='extended' required=True selection='_intrastat_arrivals' string='Arrivals'
  • intrastat_dispatches Selection
    default='extended' required=True selection='_intrastat_dispatches' string='Dispatches'
  • intrastat_region_id Many2one → intrastat.region
    comodel_name='intrastat.region' string='Default Intrastat Region'
  • intrastat_transport_id Many2one → intrastat.transport_mode
    comodel_name='intrastat.transport_mode' ondelete='restrict' string='Default Transport Mode'
Public methods (0)

No public methods.

New fields (7)
  • country_id Many2one
    related='company_id.country_id'
  • intrastat Char
    related='company_id.intrastat'
  • intrastat_accessory_costs Boolean
    readonly=False related='company_id.intrastat_accessory_costs'
  • intrastat_arrivals Selection
    readonly=False related='company_id.intrastat_arrivals'
  • intrastat_dispatches Selection
    readonly=False related='company_id.intrastat_dispatches'
  • intrastat_region_id Many2one
    readonly=False related='company_id.intrastat_region_id'
  • intrastat_transport_id Many2one
    readonly=False related='company_id.intrastat_transport_id'
Public methods (0)

No public methods.

New fields (1)
  • invoice_intrastat_detail Boolean
    string='Show intrastat details in invoice report'
Public methods (0)

No public methods.

New fields (2)
  • intrastat Selection
    related='company_id.intrastat_dispatches' string='Intrastat Declaration'
  • intrastat_transport_id Many2one → intrastat.transport_mode
    comodel_name='intrastat.transport_mode' help='This information is used in Intrastat reports' string='Transport Mode'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • get_intrastat_region(self)

New fields (1)
  • region_id Many2one → intrastat.region
    comodel_name='intrastat.region' string='Intrastat Region'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…