Skip to main content
Version: Tryton 7.0 (LTS)

account_es_sii

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 Spanish SII Module allow to send invoices to the SII <https://www.agenciatributaria.es/AEAT.internet/Ayuda_P_G417_IVA_Llevanza_libros_registro_SII.shtml>_ portal. This is legal requirement for some Spanish Companies.

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

Functional user guide

Who should use it

This module is relevant to people responsible for account es sii 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_es_sii, 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.
  • account_es — must be installed and configured before testing this module.
  • account_invoice — must be installed and configured before testing this module.
  • ir — must be installed and configured before testing this module.

Optional integrations

  • 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.configuration: groups 1 model(s), including account.configuration. These records form the information users inspect or modify during the process.
  • account.credential: groups 1 model(s), including account.credential.sii. These records form the information users inspect or modify during the process.
  • account.fiscalyear: groups 2 model(s), including account.fiscalyear, account.fiscalyear.renew. These records form the information users inspect or modify during the process.
  • account.invoice: groups 2 model(s), including account.invoice, account.invoice.sii. These records form the information users inspect or modify during the process.
  • account.period: groups 1 model(s), including account.period. These records form the information users inspect or modify during the process.
  • account.tax: groups 2 model(s), including account.tax, account.tax.template. These records form the information users inspect or modify during the process.
  • ir.cron: groups 1 model(s), including ir.cron. These records form the information users inspect or modify during the process.
  • party.identifier: groups 1 model(s), including party.identifier. 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

  • posted — action or transition that starts posted. 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 12 Python classes and declares or extends 11 models. It uses Boolean, Char, Function, Many2One, MultiValue, 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.configuration
  • account.credential.sii
  • account.fiscalyear
  • account.fiscalyear.renew
  • account.invoice
  • account.invoice.sii
  • account.period
  • account.tax
  • account.tax.template
  • ir.cron
  • party.identifier

Field types used

  • Boolean
  • Char
  • Function
  • Many2One
  • MultiValue
  • Selection

Detected classes and public methods

Classes: Configuration, CredentialSII, Cron, ESSIIPostedInvoicesError, FiscalYear, Identifier, Invoice, InvoiceSII, Period, RenewFiscalYear, Tax, TaxTemplate

Methods: check_es_sii_posted_invoices(), create_fiscalyear(), default_state(), delete(), endpoint(), endpoint2method(), es_send_to_sii(), es_sii_party_tax_identifier(), es_sii_product_type_detail(), es_sii_values(), get_client(), get_es_sii_send_invoices(), get_headers(), get_invoice_detail(), get_invoice_payload(), get_out_invoice_details(), get_payload(), get_rec_name(), get_tax_values(), invoice_type(), multivalue_model(), operation_description(), search_rec_name(), send(), set_error(), set_es_sii_send_invoices(), set_state(), tax_detail_grouping_key(), tax_grouping_key(), write()

Code map

Detected 7 Python files, 10 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
  • doc/conf.py
  • exceptions.py
  • ir.py
  • message.xml
  • party.py
  • setup.py
  • tax.xml
  • view/configuration_form.xml
  • view/fiscalyear_form.xml
  • view/invoice_sii_form.xml
  • view/invoice_sii_list.xml
  • view/period_form.xml
  • view/tax_form.xml
  • view/tax_template_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: Configuration · How to obtain the certificate and private keys? · Design · SII Invoice · Acounts Spanish SII Module · Usage · Sending Invoices to SII

    • doc/configuration.rst: The account_es_sii module uses the section account_es_sii to retrieve the path of the SSL certificates.
    • doc/design.rst: The Account ES SII Module introduces the following concepts:
    • doc/index.rst: The Account Spanish SII Module allow to send invoices to the SII <https://www.agenciatributaria.es/AEAT.internet/Ayuda_P_G417_IVA_Llevanza_libros_registro_SII.shtml>_ portal. This is legal requirement for some Spanish Companies.
    • doc/usage.rst: In order to let Tryton know that the invoices should be sent to SII you should activate the Send invoices to SII flag on the Fiscalyear <account:model-account.fiscalyear> form. When this flag is activated Tryton creates a SII Record <model-account.invoice.sii> for each invoice. This record are sent automatically to the tax authority by a Scheduled Task.

View source code