Plan: making GnuCash usable for Swedish businesses (account merge by code, SIE, templates)

Isak Adamssvärd isak.adamssvard at witsig.se
Tue Nov 24 04:59:30 EST 2026


Hello,

I'm Isak Adamssvärd, a developer in Sweden. I'd like to make GnuCash a
realistic choice for small Swedish companies and sole traders, and I
intend to maintain what I contribute, including the yearly updates this
kind of thing needs. Following John's advice to sketch larger changes
here first, this is the outline. I'd rather hear "no" or "not like
that" now than after writing code.

Disclosure: I work with an AI coding assistant and follow the draft AI
policy on the wiki. I review and can explain everything I submit, and I
will keep the pull requests small enough for that to be true.

Already submitted:

  PR #2369  Three small fixes in the sv_SE account templates.
  PR #2370  A test that reads the account templates of every locale.
            It found one of the errors fixed in #2369.

What I'd like to do, general things first.

Generally useful:

  * Match accounts by account code when merging a template into an
    existing book.
  * Per-account reporting codes (tax form field, VAT box) behind an
    accessor.
  * A fixed period lock date and gapless transaction numbering.

Sweden-specific:

  * Updated BAS account templates, built from the chart of accounts
    published at bas.se like the current 2019 ones.
  * SIE 4 export and import (the Swedish interchange format).
  * A VAT report with the Swedish boxes.

Questions:

1. Account merge. account_trees_merge matches by name, recursively
   among all descendants, while the preview in the hierarchy assistant
   matches by full name, so the two can disagree. I'd like to make both
   use one rule: a unique account code if the template account has one,
   otherwise the name among direct children. Templates without codes
   would behave as today. Is that welcome, and for future or stable?

2. SIE. PR #2217 exports SIE 4 but stalled in review. I've asked its
   author about cooperating. I'd propose an import/export module rather
   than a report: the format requires CP437, it has a symmetric import,
   and a plain C++ core (codec, model, writer, parser) can be unit
   tested, which was the main review objection. If the author doesn't
   return, may I supersede the PR with proper attribution?

3. Reporting codes. Swedish accounts need both a tax form code (SRU)
   and a VAT box, and tax-US/code holds one code. Would an accessor
   like xaccAccountGetReportingCode (account, scheme) be acceptable,
   given the 6.0 goal of hiding KVP? It would also fit German
   Kennzahlen or UK VAT boxes.

4. Locking and numbering. Swedish rules (like German GoBD) require
   that posted entries are locked, corrected only by reversing entries,
   and numbered without gaps. Is there interest in a fixed lock date
   per book in addition to the rolling read-only threshold, and in an
   "assign numbers" action? I would not touch the engine before 6.0;
   I'm asking about direction and timing.

5. Where do you want the line for country-specific code in the main
   repository?

Non-goals: no network code or filing with authorities from GnuCash, no
new dependencies, no schema changes, nothing in po/.

Order of work: account merge by code for 6.0 if you agree, SIE export
after that in small pieces, the rest in 6.x.

Thanks for reading,
Isak Adamssvärd

IA Capital Group AB
Web & IT-Service
https://witsig.se/ https://witsig.se/ 

Tel: 072-7157270 tel:+46727157270 
E-post: isak.adamssvard at witsig.se mailto:isak.adamssvard at witsig.se
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20261124/2b6be319/attachment.htm>


More information about the gnucash-devel mailing list