Skip to main content
Version: Tryton 7.0 (LTS)

account_stock_eu

Tryton 7.0 · Reference generated from the official source code

This page combines editorial guidance with evidence extracted from the selected official branch. Always test the flow with your own permissions and configuration.

Purpose

The Account Stock EU Module is used to generate the Intrastat <https://en.wikipedia.org/wiki/Intrastat>_ declarations every month.

The analysis found 11 Python files, 25 XML files, 21 views, 10 actions, 1 menus, and 0 reports.

Functional user guide

Who should use it

This module is relevant to people responsible for account stock eu processes, company configuration, and result review. Administrators should participate whenever dependencies, permissions, or sequences are introduced.

What you will be able to do

After configuration, you will be able to identify the records added by account_stock_eu, execute actions in the correct state, and understand the information shared with other modules.

Requirements and preparation

Before activation, verify company, currency, users, and groups. Install and configure required dependencies first. When real data exists, rehearse activation and upgrades on a restored copy.

Activate dependencies first, review company configuration, and rehearse the complete workflow before production use.

Required dependencies

  • account — must be installed and configured before testing this module.
  • company — must be installed and configured before testing this module.
  • country — must be installed and configured before testing this module.
  • currency — must be installed and configured before testing this module.
  • customs — must be installed and configured before testing this module.
  • ir — must be installed and configured before testing this module.
  • party — must be installed and configured before testing this module.
  • product — must be installed and configured before testing this module.
  • product_measurements — must be installed and configured before testing this module.
  • stock — must be installed and configured before testing this module.
  • stock_shipment_measurements — must be installed and configured before testing this module.

Optional integrations

  • carrier — enables an additional integration; test the combination explicitly.
  • carrier_carriage — enables an additional integration; test the combination explicitly.
  • incoterm — enables an additional integration; test the combination explicitly.
  • purchase — enables an additional integration; test the combination explicitly.
  • sale — enables an additional integration; test the combination explicitly.
  • sale_supply_drop_shipment — enables an additional integration; test the combination explicitly.
  • stock_consignment — enables an additional integration; test the combination explicitly.
  • stock_secondary_unit — enables an additional integration; test the combination explicitly.
  • Activate the module and sign in again to load menus and permissions.
  • Review new company configuration options and defaults.
  • Assign groups to test users using least privilege.
  • Create small, verifiable master data before bulk imports.
  • Run one complete scenario from draft to final state and inspect related records.

Module objects and concepts

  • account.fiscalyear: groups 1 model(s), including account.fiscalyear. These records form the information users inspect or modify during the process.
  • account.stock: groups 7 model(s), including account.stock.eu.intrastat.declaration, account.stock.eu.intrastat.declaration.context, account.stock.eu.intrastat.declaration.export, account.stock.eu.intrastat.declaration.export.result, account.stock.eu.intrastat.declaration.line. These records form the information users inspect or modify during the process.
  • carrier: groups 1 model(s), including carrier. These records form the information users inspect or modify during the process.
  • company.company: groups 1 model(s), including company.company. These records form the information users inspect or modify during the process.
  • country.country: groups 1 model(s), including country.country. These records form the information users inspect or modify during the process.
  • country.subdivision: groups 1 model(s), including country.subdivision. These records form the information users inspect or modify during the process.
  • customs.tariff: groups 1 model(s), including customs.tariff.code. These records form the information users inspect or modify during the process.
  • stock.move: groups 1 model(s), including stock.move. These records form the information users inspect or modify during the process.
  • stock.shipment: groups 6 model(s), including stock.shipment.drop, stock.shipment.in, stock.shipment.in.return, stock.shipment.internal, stock.shipment.out. These records form the information users inspect or modify during the process.

Typical workflow

  1. Select the correct company and date before creating a document.
  2. Complete master data before lines or details.
  3. Use form buttons for state changes; saving is not the same as validating or posting.
  4. Review warnings, totals, related documents, and traceability.
  5. Verify effects on dependent modules before closing the process.

Actions, states, and wizards

  • export — action or transition that starts export. Check permissions, current state, and related records before running it.
  • cancelled — action or transition that starts cancelled. Check permissions, current state, and related records before running it.
  • closed — action or transition that starts closed. Check permissions, current state, and related records before running it.
  • done — action or transition that starts done. Check permissions, current state, and related records before running it.
  • opened — action or transition that starts opened. Check permissions, current state, and related records before running it.
  • account.stock.eu.intrastat.declaration.export — wizard that collects data and performs account › stock › eu › intrastat › declaration › export. Check permissions, current state, and related records before running it.

Controls before production

  • Define who creates, reviews, confirms, cancels, and reads.
  • Test closed periods, unauthorized users, and incomplete data.
  • Verify numbering, currency, rounding, and time zone where applicable.
  • Document error correction without direct database edits.
  • Include its tables and files in backup and restore procedures.

Troubleshooting

  • If a menu is missing, verify activation, module-list update, groups, and a new login session.
  • If a field rejects a value, inspect its domain, company, state, and configured dependencies.
  • If a button is hidden or disabled, check permissions and valid transitions; never change state with SQL.
  • If results differ, reproduce a minimal case and compare related records before and after.
  • Keep the full traceback, version, active modules, and minimal data needed to diagnose an error.

Developer guide

Architecture and extension points

The package contains 31 Python classes and declares or extends 20 models. It uses Binary, Boolean, Char, Date, Float, Function, Many2One, Numeric, Selection. Developers should first determine whether a class creates a model or uses PoolMeta to extend one, preserve super() calls, and avoid duplicating dependency rules.

Registered or extended models

  • account.fiscalyear
  • account.stock.eu.intrastat.declaration
  • account.stock.eu.intrastat.declaration.context
  • account.stock.eu.intrastat.declaration.export
  • account.stock.eu.intrastat.declaration.export.result
  • account.stock.eu.intrastat.declaration.line
  • account.stock.eu.intrastat.transaction
  • account.stock.eu.intrastat.transport
  • carrier
  • company.company
  • country.country
  • country.subdivision
  • customs.tariff.code
  • stock.move
  • stock.shipment.drop
  • stock.shipment.in
  • stock.shipment.in.return
  • stock.shipment.internal
  • stock.shipment.out
  • stock.shipment.out.return

Field types used

  • Binary
  • Boolean
  • Char
  • Date
  • Float
  • Function
  • Many2One
  • Numeric
  • Selection

Detected classes and public methods

Classes: Carrier, Company, CounterPartyNotFound, Country, CountryNotFound, FiscalYear, IntrastatDeclaration, IntrastatDeclarationContext, IntrastatDeclarationExport, IntrastatDeclarationExportResult, IntrastatDeclarationExport_BE, IntrastatDeclarationExport_BE_Incoterm, IntrastatDeclarationExport_ES, IntrastatDeclarationExport_ES_Incoterm, IntrastatDeclarationExport_Incoterm, IntrastatDeclarationLine, IntrastatDeclarationLine_Incoterm, IntrastatTransaction, IntrastatTransport, Move, Move_Consignment, Move_Incoterm, ShipmentDrop, ShipmentIn, ShipmentInReturn, ShipmentInternal, ShipmentMixin, ShipmentOut, ShipmentOutReturn, Subdivision, TariffCode

Methods: cancel(), close(), copy(), create(), default_company(), default_declaration(), default_result(), default_state(), delete(), do(), export(), export_be(), export_be_row(), export_es(), export_es_row(), export_fallback(), export_fallback_row(), get(), get_intrastat(), get_intrastat_currency(), get_rec_name(), in_intrastat(), intrastat_from_country(), intrastat_to_country(), on_change_company(), on_change_customer(), on_change_supplier(), on_change_with_country_in_intrastat(), on_change_with_extended(), on_change_with_intrastat_extended(), on_change_with_intrastat_from_country(), on_change_with_intrastat_tariff_code_uom(), on_change_with_intrastat_to_country(), on_change_with_intrastat_type(), open(), table_query(), transition_generate(), view_attributes(), write()

Code map

Detected 11 Python files, 25 XML files, and 0 explicit access files. XML connects models to views, menus, actions, and reports; access CSV files establish initial permissions.

  • __init__.py
  • account.py
  • account.xml
  • account_stock_eu.py
  • account_stock_eu.xml
  • carrier.py
  • carrier.xml
  • company.py
  • country.py
  • country.xml
  • customs.py
  • customs.xml
  • doc/conf.py
  • exceptions.py
  • message.xml
  • setup.py
  • stock.py
  • stock.xml
  • view/account_fiscalyear_form.xml
  • view/carrier_form.xml
  • view/country_subdivision_form.xml
  • view/country_subdivision_list.xml
  • view/customs_tariff_code_form.xml
  • view/intrastat_declaration_context_form.xml
  • view/intrastat_declaration_export_result_form.xml
  • view/intrastat_declaration_form.xml
  • view/intrastat_declaration_line_list.xml
  • view/intrastat_declaration_line_list_incoterm.xml
  • view/intrastat_declaration_list.xml
  • view/intrastat_transaction_form.xml
  • view/intrastat_transaction_list.xml
  • view/intrastat_transport_form.xml
  • view/intrastat_transport_list.xml
  • view/stock_move_form.xml
  • view/stock_move_form_incoterm.xml
  • view/stock_shipment_form.xml

Test plan

  • Activation on an empty database and upgrade from the previous revision.
  • Create, update, copy, and delete according to state and access rights.
  • Every button, transition, and wizard with valid and invalid scenarios.
  • Applicable multi-company rules, translations, time zones, and currencies.
  • Combined installation with required and optional dependencies.
  • Backup and restore of records, attachments, and generated reports.

Compatibility and upgrades

Keep server and modules on series 7.0. Before upgrading, compare tryton.cfg, __register__ migrations, state changes, XML IDs, and permissions. A successful build does not replace a rehearsed migration or functional data reconciliation.

Official documentation evidence

Topics found: Design · Intrastat Declaration · Intrastat Declaration Export · Intrastat Transaction · Intrastat Transport · Shipment · Stock Move · Tariff Code · Fiscal Year · Subdivision · Account Stock EU Module · Usage · Activate extended Intrastat declaration · Declarations after Brexit

    • doc/design.rst: The Account Stock EU Module introduces and extends the following concepts:
    • doc/index.rst: The Account Stock EU Module is used to generate the Intrastat <https://en.wikipedia.org/wiki/Intrastat>_ declarations every month.

View source code