Bug 452863 - New file setup wizard: UK VAT Accounts produces "invalid top-level account type" error
Summary: New file setup wizard: UK VAT Accounts produces "invalid top-level account ty...
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Unclassified
Component: general (show other bugs)
Version: 5.1.2
Platform: Neon Packages Linux
: NOR minor (vote)
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-22 14:16 UTC by Paul Worrall
Modified: 2022-04-23 16:59 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.1.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Worrall 2022-04-22 14:16:10 UTC
STEPS TO REPRODUCE
1.  File=>New
2. Personal data: Enter some personal data
3. Select currency: British Pound
4. Select accounts: Untick "I have a current account"
5. United Kingdom account types: choose "UK VAT Accounts"
6. Finish

OBSERVED RESULT
Error message: "Invalid top-level account type 1 in template file file:///usr/share/kmymoney/templates/en_GB/uk-vat.kmt"

EXPECTED RESULT
No error

SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.24
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3
Kernel Version: 5.13.0-40-generic (64-bit)
Graphics Platform: X11
Processors: 2 × AMD A6-6400K APU with Radeon(tm) HD Graphics
Memory: 7.7 GiB of RAM
Graphics Processor: AMD CEDAR
Comment 1 Thomas Baumgart 2022-04-23 16:58:55 UTC
Git commit e3aeaf5f8da29fee53e70840df855ff4745bb65f by Thomas Baumgart.
Committed on 23/04/2022 at 16:51.
Pushed by tbaumgart into branch 'master'.

Ran xea2kmt on current GnuCash maint branch

M  +1    -1    kmymoney/templates/de_AT/business.kmt
M  +2    -2    kmymoney/templates/de_AT/common.kmt
M  +1    -2    kmymoney/templates/de_DE/skr49.kmt
A  +28   -0    kmymoney/templates/dk/car.kmt
A  +89   -0    kmymoney/templates/dk/common.kmt
A  +27   -0    kmymoney/templates/dk/homeloan.kmt
A  +27   -0    kmymoney/templates/dk/homeown.kmt
M  +2    -2    kmymoney/templates/en_GB/uk-vat.kmt
M  +1    -1    kmymoney/templates/fi_FI/sbr-xbrl.kmt
M  +1    -1    kmymoney/templates/lv/business.kmt
A  +106  -0    kmymoney/templates/pt_PT/business.kmt
A  +29   -0    kmymoney/templates/pt_PT/checkbook.kmt
M  +2    -2    kmymoney/templates/pt_PT/homeloan.kmt
M  +3    -3    kmymoney/templates/pt_PT/spouseinc.kmt
M  +1    -1    kmymoney/templates/sv_AX/sbr-xbrl.kmt
M  +1    -1    kmymoney/templates/sv_FI/sbr-xbrl.kmt
A  +44   -0    kmymoney/templates/zh_TW/brokerage.kmt
M  +16   -18   kmymoney/templates/zh_TW/business.kmt
A  +27   -0    kmymoney/templates/zh_TW/carloan.kmt
A  +29   -0    kmymoney/templates/zh_TW/cdmoneymkt.kmt
A  +29   -0    kmymoney/templates/zh_TW/checkbook.kmt
A  +20   -0    kmymoney/templates/zh_TW/childcare.kmt
A  +86   -0    kmymoney/templates/zh_TW/common.kmt
A  +27   -0    kmymoney/templates/zh_TW/eduloan.kmt
A  +24   -0    kmymoney/templates/zh_TW/fixedassets.kmt
A  +27   -0    kmymoney/templates/zh_TW/homeloan.kmt
A  +27   -0    kmymoney/templates/zh_TW/homeown.kmt
A  +27   -0    kmymoney/templates/zh_TW/otherloan.kmt
A  +23   -0    kmymoney/templates/zh_TW/renter.kmt
A  +30   -0    kmymoney/templates/zh_TW/retiremt.kmt
A  +27   -0    kmymoney/templates/zh_TW/spouseinc.kmt
A  +30   -0    kmymoney/templates/zh_TW/spouseretire.kmt
A  +32   -0    kmymoney/templates/zh_TW/vehicle.kmt

https://invent.kde.org/office/kmymoney/commit/e3aeaf5f8da29fee53e70840df855ff4745bb65f
Comment 2 Thomas Baumgart 2022-04-23 16:59:03 UTC
Git commit 182c22674187a5e73b2842fcdb4cf8f5d58a1ae7 by Thomas Baumgart.
Committed on 23/04/2022 at 16:51.
Pushed by tbaumgart into branch 'master'.

Convert GnuCash account type to valid top-level account type

The GnuCash template may use any account type for top-level account
groups. KMyMoney only supports certain types. The current conversion did
not take that into account and some templates failed during loading into
KMyMoney.

This change adjusts the account type of the top-level accounts to those
supported by KMyMoney and makes the templates loadable.

M  +1    -1    kmymoney/mymoney/mymoneyaccount.cpp
M  +1    -1    kmymoney/mymoney/mymoneyaccount.h
M  +20   -8    tools/xea2kmt.cpp

https://invent.kde.org/office/kmymoney/commit/182c22674187a5e73b2842fcdb4cf8f5d58a1ae7
Comment 3 Thomas Baumgart 2022-04-23 16:59:07 UTC
Git commit a85761da6a7101d4b242cd6f89f95b6308ee3211 by Thomas Baumgart.
Committed on 23/04/2022 at 16:53.
Pushed by tbaumgart into branch '5.1'.

Convert GnuCash account type to valid top-level account type

The GnuCash template may use any account type for top-level account
groups. KMyMoney only supports certain types. The current conversion did
not take that into account and some templates failed during loading into
KMyMoney.

This change adjusts the account type of the top-level accounts to those
supported by KMyMoney and makes the templates loadable.
(cherry picked from commit 182c22674187a5e73b2842fcdb4cf8f5d58a1ae7)

M  +9    -4    kmymoney/mymoney/mymoneyaccount.cpp
M  +5    -0    kmymoney/mymoney/mymoneyaccount.h
M  +20   -8    tools/xea2kmt.cpp

https://invent.kde.org/office/kmymoney/commit/a85761da6a7101d4b242cd6f89f95b6308ee3211
Comment 4 Thomas Baumgart 2022-04-23 16:59:15 UTC
Git commit eb71db87a0bcfa5c49c95c1ebfc6ee2cfed7cb58 by Thomas Baumgart.
Committed on 23/04/2022 at 16:54.
Pushed by tbaumgart into branch '5.1'.

Ran xea2kmt on current GnuCash maint branch
FIXED-IN: 5.1.3

(cherry picked from commit e3aeaf5f8da29fee53e70840df855ff4745bb65f)

M  +1    -1    kmymoney/templates/de_AT/business.kmt
M  +2    -2    kmymoney/templates/de_AT/common.kmt
M  +1    -2    kmymoney/templates/de_DE/skr49.kmt
A  +28   -0    kmymoney/templates/dk/car.kmt
A  +89   -0    kmymoney/templates/dk/common.kmt
A  +27   -0    kmymoney/templates/dk/homeloan.kmt
A  +27   -0    kmymoney/templates/dk/homeown.kmt
M  +2    -2    kmymoney/templates/en_GB/uk-vat.kmt
M  +1    -1    kmymoney/templates/fi_FI/sbr-xbrl.kmt
M  +1    -1    kmymoney/templates/lv/business.kmt
A  +106  -0    kmymoney/templates/pt_PT/business.kmt
A  +29   -0    kmymoney/templates/pt_PT/checkbook.kmt
M  +2    -2    kmymoney/templates/pt_PT/homeloan.kmt
M  +3    -3    kmymoney/templates/pt_PT/spouseinc.kmt
M  +1    -1    kmymoney/templates/sv_AX/sbr-xbrl.kmt
M  +1    -1    kmymoney/templates/sv_FI/sbr-xbrl.kmt
A  +44   -0    kmymoney/templates/zh_TW/brokerage.kmt
M  +16   -18   kmymoney/templates/zh_TW/business.kmt
A  +27   -0    kmymoney/templates/zh_TW/carloan.kmt
A  +29   -0    kmymoney/templates/zh_TW/cdmoneymkt.kmt
A  +29   -0    kmymoney/templates/zh_TW/checkbook.kmt
A  +20   -0    kmymoney/templates/zh_TW/childcare.kmt
A  +86   -0    kmymoney/templates/zh_TW/common.kmt
A  +27   -0    kmymoney/templates/zh_TW/eduloan.kmt
A  +24   -0    kmymoney/templates/zh_TW/fixedassets.kmt
A  +27   -0    kmymoney/templates/zh_TW/homeloan.kmt
A  +27   -0    kmymoney/templates/zh_TW/homeown.kmt
A  +27   -0    kmymoney/templates/zh_TW/otherloan.kmt
A  +23   -0    kmymoney/templates/zh_TW/renter.kmt
A  +30   -0    kmymoney/templates/zh_TW/retiremt.kmt
A  +27   -0    kmymoney/templates/zh_TW/spouseinc.kmt
A  +30   -0    kmymoney/templates/zh_TW/spouseretire.kmt
A  +32   -0    kmymoney/templates/zh_TW/vehicle.kmt

https://invent.kde.org/office/kmymoney/commit/eb71db87a0bcfa5c49c95c1ebfc6ee2cfed7cb58