Daily updates from Odoo
Sunday, May 31, 2026
1 change
Resolved issues and error corrections
This update fixes a critical issue preventing Odoo's Swedish SIE4 export files from being accepted by Swedish tax authorities and accounting systems. The changes ensure full compliance with the SIE4 specification, including correct encoding and data formatting, and adds required identification posts for accurate reporting.
Original PR description
The current implementation of l10n_se_sie4_export does not follow the SIE4 specification (version 4C, 2025-08-06) in several critical areas, causing exported files to be rejected by Swedish audit…
The current implementation of l10n_se_sie4_export does not follow the SIE4 specification (version 4C, 2025-08-06) in several critical areas, causing exported files to be rejected by Swedish audit software, accounting systems and Skatteverket's own tools. This PR corrects all known spec deviations and completes the implementation of optional but commonly required identification posts. Note: The character encoding was set to ISO-8859-1. The SIE4 specification §5.8 explicitly requires IBM PC Codepage 437 (CP437). Files generated by the current implementation cannot be correctly read by any SIE4-compliant receiving system. Some identification posts are optional per the SIE4 specification, but required in real world use by Swedish audit software, accounting systems and government filing tools. The exported file has been validated against the official SIE4 validator at https://sietest.sie.se and passes all checks. **Specification reference:** https://sie.se/wp-content/uploads/2026/02/SIE_filformat_ver_4C_2025-08-06.pdf **Fixes:** - CP437 encoding per spec §5.8 - Amount format max 2 decimals per spec §5.9 - Identification posts in correct order per spec §5.12 - #VER sequence number per serie per spec §11 - #VER with all 6 fields per spec §11 - partner_id.company_registry as canonical source - stdnum.luhn for org number validation (v1.17/v1.19 compatible) - _escape_sie on all string values - Correct implementation order **Feature completion:** - #ORGNR with Luhn validation and report header warning - #ADRESS, #FNR, #GEN with username - #KPTYP hardcoded EUBAS97 (Odoo Swedish chart) - #VALUTA always written - #PROSA support - #KSUMMA per spec §10 - #OMFATTN for partial period export - Import key in #VER sign field (move.name) - 7 tests including encoding, round-trip and KSUMMA