TIP: You can type at any time to perform a new search.
Suministro Inmediato de Información en el IVA
l10n_es_aeat_sii_oca · OCA/l10n-spain
🛠 Migration considerations
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `UPDATE account_move SET sii_registration_key = %s WHERE move_type IN ('in_invoice', 'in_refund');` - re-check the table/column names still match after upgrading. migration-raw-sql-write · source
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `UPDATE account_move SET sii_registration_key = %s WHERE move_type IN ('out_invoice', 'out_refund');` - re-check the table/column names still match after upgrading. migration-raw-sql-write · source
Found by automated static analysis: patterns worth a look before/after upgrading this module to a newer Odoo version.
- Repository
- OCA/l10n-spain · module folder · Try on Runboat
- Module version
- Category
- Accounting & Finance
- Folder size
- 1.33 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/l10n-spain
- Last tracking update
- 2026-08-20 17:29:47
- Authors
- Odoo Community Association (OCA), Acysos S.L., Tecnativa, Comunitea, Diagram, Minorisa, Studio73, FactorLibre, Otherway, Javi Melendez, Sygel
- Maintainers
- Odoo Community Association (OCA), Acysos S.L., Tecnativa, Comunitea, Diagram, Minorisa, Studio73, FactorLibre, Otherway, Javi Melendez, Sygel
- Committers
- Pedro M. Baeza, Emilio Pascual, OCA-git-bot, oca-ci
- Odoo dependencies
- Python dependencies
- requests, zeep, unidecode
- System dependencies
- None
- Required by
- l10n_es_aeat_sii_match
- Description
Módulo para la presentación inmediata del IVA <https://www.agenciatributaria.es/static_files/AEAT/Contenidos_Comunes/La_Agencia_Tributaria/Modelos_y_formularios/Suministro_inmediato_informacion/FicherosSuministros/V_1_1/SII_Descripcion_ServicioWeb_v1.1.pdf>
Code Analysis ⓘ
Views touched (15)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
account_journal_dashboard_kanban_view |
account.journal.dashboard.kanban | account.journal | kanban | Inherits account.account_journal_dashboard_kanban_view |
aeat_sii_map_view_form |
aeat.sii.map.view.form | aeat.sii.map | form | New |
aeat_sii_map_view_tree |
aeat.sii.map.view.tree | aeat.sii.map | list | New |
aeat_sii_mapping_registration_keys_view_search |
aeat.sii.mapping.registration.keys.view.search | aeat.sii.mapping.registration.keys | search | New |
aeat_sii_mapping_registration_keys_view_tree |
aeat.sii.mapping.registration.keys.view.tree | aeat.sii.mapping.registration.keys | list | New |
aeat_sii_tax_agency_form_view |
aeat.tax.agency.form - l10n_es_aeat_sii_oca | aeat.tax.agency | form | Inherits l10n_es_aeat.aeat_tax_agency_form_view |
invoice_sii_form |
account.invoice.sii.form | account.move | form | Inherits l10n_es_aeat.view_move_form |
l10n_es_aeat_sii_map_lines_view_tree |
aeat.sii.map.lines.view.tree | aeat.sii.map.lines | list | New |
product_template_form_sii_view |
product.template.form.inherit.sii | product.template | form | Inherits account.product_template_form_view |
view_account_invoice_sii_filter |
account.invoice.select.sii | account.move | Inherits account.view_account_invoice_filter | |
view_account_journal_thirdparty_form |
account.journal | form | Inherits l10n_es_aeat.view_account_journal_form | |
view_account_move_reversal |
account.move.reversal | Inherits account.view_account_move_reversal | ||
view_account_position_form |
account.fiscal.position.form | account.fiscal.position | form | Inherits account.view_account_position_form |
view_company_sii_form |
res.company.sii.form | res.company | form | Inherits base.view_company_form |
view_wizard_send_sii |
Send SII Wizard | wizard.send.sii | form | New |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (14)
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (6)
-
sii_enabledBooleanreadonly=Truerelated='company_id.sii_enabled' -
sii_exempt_causeSelectiondefault=<expr>selection='_get_selection_sii_exempt_cause'string='SII Exempt Cause' -
sii_no_taxable_causeSelectiondefault='ImporteTAIReglasLocalizacion'selection=[('ImportePorArticulos7_14_Otros', 'No sujeta - No sujeción artículo 7, 14, otros'), ('ImporteTAIReglasLocalizacion', 'Operaciones no sujetas en el TAI por reglas de localización')]string='SII No taxable cause' -
sii_partner_identification_typeSelectionselection=[('1', 'National'), ('2', 'Intracom'), ('3', 'Export')]string='SII partner Identification Type' -
sii_registration_key_purchaseMany2one → aeat.sii.mapping.registration.keysdomain=Domain('type', '=', 'purchase') args: 'aeat.sii.mapping.registration.keys', 'Default SII Registration Key for Purchases' -
sii_registration_key_saleMany2one → aeat.sii.mapping.registration.keysdomain=Domain('type', '=', 'sale') args: 'aeat.sii.mapping.registration.keys', 'Default SII Registration Key for Sales'
-
default_sii_exempt_cause(self)@api.model
New fields (2)
-
company_sii_enabledBooleanrelated='company_id.sii_enabled'string='Company enable SII' -
sii_enabledBooleandefault=Truestring='Enable SII'
No public methods.
New fields (7)
-
sii_dua_invoiceBooleancompute='_compute_dua_invoice' -
sii_lc_operationBooleancopy=Falsehelp='Check this mark if this invoice represents a complementary settlement for customs.\nThe invoice number should start with LC, QZC, QRC, A01 or A02.'string='Customs - Complementary settlement' -
sii_property_cadastrial_codeCharcopy=Falsestring='Real property cadastrial code' -
sii_property_locationSelectioncopy=Falseselection=[('1', '[1]-Real property with cadastral code located within the Spanish territory except Basque Country or Navarra'), ('2', '[2]-Real property located in the Basque Country or Navarra'), ('3', '[3]-Real property in any of the above situations but without cadastral code'), ('4', '[4]-Real property located in a foreign country')]string='Real property location' -
sii_refund_specific_invoice_typeSelectionhelp='Fill this field when the refund are one of the specific cases of article 80 of LIVA for notifying to SII with the proper invoice type.'selection=[('R1', 'Error based on law and Art. 80 One and Two LIVA (R1)'), ('R2', 'Art. 80 Three LIVA - Bankruptcy (R2)'), ('R3', 'Art. 80 Four LIVA - Bad debt (R3)'), ('R4', 'Rest of causes (R4)')] -
sii_registration_key_additional1Many2one → aeat.sii.mapping.registration.keyscomodel_name='aeat.sii.mapping.registration.keys'string='Additional SII registration key' -
sii_registration_key_additional2Many2one → aeat.sii.mapping.registration.keyscomodel_name='aeat.sii.mapping.registration.keys'string='Additional 2 SII registration key'
-
button_cancel(self) -
button_draft(self) -
cancel_one_invoice(self) -
cancel_sii(self) -
is_sii_invoice(self)Hook method to be overridden in additional modules to verify if the invoice must be sended trough SII system, for special cases. :param self: Single invoice record :return: bool value indicating if the invoice should be sent to SII. -
process_send_sii(self) -
write(self, vals)For supplier invoices the SII primary key is the supplier VAT/ID Otro and the supplier invoice number. Cannot let change these values in a SII registered supplier invoice
New fields (4)
-
sii_refund_typeSelectionselection=_selection_sii_refund_typestring='SII Refund Type' -
sii_refund_type_requiredBooleanstring='Is SII Refund Type required?' -
supplier_invoice_number_refundCharstring='Supplier Invoice Number' -
supplier_invoice_number_refund_requiredBooleanstring='Is Supplier Invoice Number Required?'
-
default_get(self, fields_list)The previous default methods have been moved here to avoid computing the same queries multiple times, also to avoid duplicated code. -
reverse_moves(self, is_modify=False)
New fields (5)
-
date_fromDate -
date_toDate -
map_linesOne2many → aeat.sii.map.linescomodel_name='aeat.sii.map.lines'inverse_name='sii_map_id'string='Lines' -
nameCharrequired=Truestring='Model' -
tax_agency_idMany2one → aeat.tax.agencycomodel_name='aeat.tax.agency'string='Tax Agency'
No public methods.
New fields (4)
-
codeCharrequired=True -
nameChar -
sii_map_idMany2one → aeat.sii.mapcomodel_name='aeat.sii.map'ondelete='cascade'string='Aeat SII Map' -
tax_xmlid_idsMany2many → l10n.es.aeat.map.tax.line.taxcomodel_name='l10n.es.aeat.map.tax.line.tax'string='Taxes templates'
No public methods.
New fields (3)
-
codeCharrequired=Truesize=2 -
nameCharrequired=True -
typeSelectionrequired=Trueselection=[('sale', 'Sale'), ('purchase', 'Purchase')]
No public methods.
New fields (14)
-
sii_wsdl_icCharstring='SuministroOpIntracomunitarias WSDL' -
sii_wsdl_ic_test_addressCharstring='SuministroOpIntracomunitarias Test Address' -
sii_wsdl_inCharstring='SuministroFactRecibidas WSDL' -
sii_wsdl_in_test_addressCharstring='SuministroFactRecibidas Test Address' -
sii_wsdl_ottCharstring='SuministroOpTrascendTribu WSDL' -
sii_wsdl_ott_test_addressCharstring='SuministroOpTrascendTribu Test Address' -
sii_wsdl_outCharstring='SuministroFactEmitidas WSDL' -
sii_wsdl_out_test_addressCharstring='SuministroFactEmitidas Test Address' -
sii_wsdl_piCharstring='SuministroBienesInversion WSDL' -
sii_wsdl_pi_test_addressCharstring='SuministroBienesInversion Test Address' -
sii_wsdl_prCharstring='SuministroCobrosEmitidas WSDL' -
sii_wsdl_pr_test_addressCharstring='SuministroCobrosEmitidas Test Address' -
sii_wsdl_psCharstring='SuministroPagosRecibidas WSDL' -
sii_wsdl_ps_test_addressCharstring='SuministroPagosRecibidas Test Address'
No public methods.
New fields (1)
-
sii_exempt_causeSelectionselection=[('none', 'None'), ('E1', '[E1] Art. 20: Operaciones interiores exentas'), ('E2', '[E2] Art. 21: Exenciones en las exportaciones de bienes'), ('E3', '[E3] Art. 22: Exenciones en las operaciones asimiladas a las exportaciones'), ('E4', '[E4] Art. 23 y 24: Exenciones relativas a regímenes aduaneros y fiscales. Exenciones zonas francas, depósitos francos y otros depósitos.'), ('E5', '[E5] Art. 25: Exenciones en las entregas de bienes destinados a otro estado miembro.'), ('E6', '[E6] Otros')]string='SII Exempt Cause'
No public methods.
New fields (12)
-
delay_timeFloat -
send_modeSelectiondefault='delayed'selection=[('auto', 'On validate'), ('fixed', 'At fixed time'), ('delayed', 'With delay')] -
sent_timeFloat -
sii_descriptionCharhelp="The description for invoices. Only used when the field SII Description Method is 'Fixed'."size=500string='SII Description' -
sii_description_methodSelectiondefault='manual'help="Method for the SII invoices description, can be one of these:\n- Automatic: the description will be the join of the invoice lines description\n- Fixed: the description write on the below field 'SII Description'\n- Manual (by default): It will be necessary to manually enter the description on each invoice\n\nFor all the options you can append a header text using the below fields 'SII Sale header' and 'SII Purchase header'"selection=[('auto', 'Automatic'), ('fixed', 'Fixed'), ('manual', 'Manual')]string='SII Description Method' -
sii_enabledBooleanstring='Enable SII' -
sii_header_customerCharhelp='An optional header description for customer invoices. Applied on all the SII description methods'size=500string='SII Customer header' -
sii_header_supplierCharhelp='An optional header description for supplier invoices. Applied on all the SII description methods'size=500string='SII Supplier header' -
sii_methodSelectiondefault='auto'help="By default, the invoice is sent/queued in validation process. With manual method, there's a button to send the invoice."selection=[('auto', 'Automatic'), ('manual', 'Manual')]string='Method' -
sii_periodSelectiondefault='monthly'selection=[('monthly', 'Monthly'), ('quarterly', 'Quarterly')] -
sii_start_dateDatehelp="If this field is set, the sii won't be enabled on invoices with lower invoice date. If not set, the sii can be enabled on all invoice dates" -
sii_testBooleanstring='Is it the SII test environment?'
No public methods.
New fields (1)
-
sii_enabledBooleancompute='_compute_aeat_sending_enabled'
No public methods.
New fields (14)
-
aeat_stateSelectionselection_add=SII_STATES -
company_idMany2one → res.companycomodel_name='res.company'string='Company' -
sii_account_registration_dateDatecopy=Falsehelp='Indicates the account registration date set at the SII, which must be the date when the document is recorded in the system and is independent of the date of the accounting entry of the document'readonly=Truestring='SII account registration date' -
sii_csvCharcopy=Falseindex=Truereadonly=Truestring='SII CSV' -
sii_descriptionCharcompute='_compute_sii_description'copy=Falsedefault='/'readonly=Falsesize=500store=Truestring='SII computed description' -
sii_enabledBooleancompute='_compute_sii_enabled'search='_search_sii_enabled'string='Enable SII' -
sii_macrodataBooleancompute='_compute_macrodata'help='Check to confirm that the document has an absolute amount greater o equal to 100 000 000,00 euros.'string='MacroData' -
sii_needs_cancelBooleancopy=Falsereadonly=True -
sii_refund_typeSelectioncompute='_compute_sii_refund_type'readonly=Falseselection=[('I', 'By differences')]store=Truestring='SII Refund Type' -
sii_registration_keyMany2one → aeat.sii.mapping.registration.keyscomodel_name='aeat.sii.mapping.registration.keys'compute='_compute_sii_registration_key'readonly=Falsestore=Truestring='SII registration key' -
sii_registration_key_codeCharcompute='_compute_sii_registration_key_code'readonly=Truestring='SII Code' -
sii_registration_key_domainCharcompute='_compute_sii_registration_key_domain'string='SII registration key domain' -
sii_returnTextcopy=Falsereadonly=Truestring='SII Return' -
sii_send_dateDatetimecopy=Falseindex=Truestring='SII Send Date'
-
confirm_one_document(self) -
send_sii(self) -
send_sii_now(self)
New fields (5)
-
account_move_idsMany2many → account.movestring='Invoices' args: 'account.move' -
modified_numberInteger -
moves_to_sendInteger -
not_send_without_errors_numberInteger -
with_errors_numberInteger
-
action_confirm(self) -
default_get(self, fields)
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…