Bug 339659

Summary: xea2kmt not available
Product: [Applications] kmymoney Reporter: Ralf Habacker <ralf.habacker>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 4.6.6   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 4.8.0
Sentry Crash Report:
Attachments: Add xea2kmt-all to be able to update all kmymoney templates

Description Ralf Habacker 2014-10-04 12:04:41 UTC
The kmymoney templates are generated from the related gnucash templates using a xea2kmt tool (at least it is mentioned as comment in the template header). 
I'm trying to convert an updated gnucash template to kmt but did not found the tool, neither in the contrib folder of kmymoney source nor in the internet. At least Thomas Baumgart seem to have it on is local development machine as mentioned at http://marc.info/?l=kmymoney-devel&m=128637909907523.
Could this tool be added to the kmymoney source to be able to keep templates up to date ?

Reproducible: Always

Steps to Reproduce:
1.  fetch gnucash sources 
2. try to convert an xea file to kmt


Actual Results:  
xea2kmt could not be found

Expected Results:  
xea2kmt should be present and execautable
Comment 1 Thomas Baumgart 2014-10-05 07:48:17 UTC
Git commit 3da41ab20ff888baccab50a94b59a35eee1927ac by Thomas Baumgart.
Committed on 05/10/2014 at 07:45.
Pushed by tbaumgart into branch 'master'.

Add tool to convert GNUCash templates to KMyMoney

I wrote this little tool a long time ago to convert template files
from GNUCash format to KMyMoney format as best as I could and used
it to convert the first set of templates.

Now people are asking for it, so here it is. I have not tested it
since 2008 so YMMV since the GNC format might have changed in the
meantime.

A  +236  -0    contrib/xea2kmt

http://commits.kde.org/kmymoney/3da41ab20ff888baccab50a94b59a35eee1927ac
Comment 2 Ralf Habacker 2014-10-05 17:35:32 UTC
Created attachment 88979 [details]
Add xea2kmt-all to be able to update all kmymoney templates
Comment 3 Ralf Habacker 2014-10-05 17:37:38 UTC
(In reply to Thomas Baumgart from comment #1)
> Now people are asking for it, so here it is. I have not tested it
> since 2008 so YMMV since the GNC format might have changed in the
> meantime.
Append is a patch containing an additional tool to convert all gnucash templates and xea2kmt fixes, which makes it able to check the differences :-)
Comment 4 Ralf Habacker 2014-10-06 06:42:09 UTC
For the record:  KMyMoney is mentioned in an article of the german iX magazine ( http://www.heise.de/ix/inhalt/2014/9/4/). The author notes to use a default DATEV account template, so account templates should be up to date.
Comment 5 Ralf Habacker 2014-10-06 20:57:06 UTC
(In reply to Ralf Habacker from comment #3)
> (In reply to Thomas Baumgart from comment #1)
> > Now people are asking for it, so here it is. I have not tested it
> > since 2008 so YMMV since the GNC format might have changed in the
> > meantime.
> Append is a patch containing an additional tool to convert all gnucash
> templates and xea2kmt fixes, which makes it able to check the differences :-)

There are at least two issues: 
1. The xml tag <gnc-act:start-selected>1</gnc-act:start-selected> is not handled correctly for example in
 /home/ralf/src/kmymoney/kmymoney/templates/sv_SE/common.kmt: 
<longdesc><gnc-act:start-selected>1</gnc-act:start-selected> <gnc:account version="2.0.0"></longdesc>

2.  I saw errors like the following: 
/home/ralf/src/kmymoney/kmymoney/templates/de_DE/wohnungsw.kmt:16: parser error : error parsing attribute name
 <account type="9" name=""  <account type="9" name="">