Bug 290473 - Exported account template cannot be imported again
Summary: Exported account template cannot be imported again
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: git (master)
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks: 347037
  Show dependency treegraph
 
Reported: 2012-01-03 07:54 UTC by Thomas Baumgart
Modified: 2019-08-30 15:53 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.1,5.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Baumgart 2012-01-03 07:54:14 UTC
Version:           git master (using KDE 4.6.0) 
OS:                Linux

The function "File/Export/Account template" allows to store the current account hierarchy in a .kmt file. Using "File/Import/Account template" does not allow to import the exported file easily.

One currently needs to move the exported file into the system $KDEDIR/share/apps/kmymoney/template/<country> to be able to import the file again. This directory might not be writable by a regular user. Also, it will show up w/o title and description, because those fields of the .kmt file are not filled during export.

Reproducible: Always

Steps to Reproduce:
See details.

Actual Results:  
Cumbersome usage (I think this used to work in e.g. 0.8 or before)

Expected Results:  
Idea: select ~/.kde4/share/apps/kmymoney/template as the default directory when exporting the template and use files from this location as well during import
Comment 1 Thomas Baumgart 2012-01-03 08:53:07 UTC
~/.kde4/share/apps/kmymoney/templates/<country> is already scanned by current code, so creating this directory (any existing country will do as long as it is either in format 'xx' or 'xx_xx', I tried here with de_DE) and dropping the file there allows KMyMoney to pick it up and display the entry in the import dialog under the selected country.
Comment 2 ReggieK 2012-10-16 19:11:11 UTC
Tried this:
Created a .kmy file. Manually added some accounts.
Did a File->Export->Template to:
~/.kde4/share/apps/kmymoney/templates/us/baseline-template-experiment.kmt

Created a new kmymoney file
Attempted File->import->Account Template
selected "United States of America"
It could not find the template

Further, manual examination of the exported file did not contain anything looking like the accounts I expected to be exported.

Here's the file:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE KMYMONEY-TEMPLATE>
<kmymoney-account-template>
 <title/>
 <shortdesc/>
 <longdesc/>
 <accounts>
  <account type="12" name=""/>
  <account type="13" name=""/>
 </accounts>
</kmymoney-account-template>

My environment:
Xubuntu 12.04
KMyMoney 4.6.3 from the Ubuntu PPA:
deb http://ppa.launchpad.net/claydoh/kmymoney2-kde4/ubuntu precise main
Comment 3 Ralf Habacker 2016-10-06 15:49:17 UTC
Git commit 229570f64cc6dff6a4882cf81ad17adb347074e2 by Ralf Habacker.
Committed on 06/10/2016 at 15:48.
Pushed by habacker into branch '4.8'.

Export templates into kmymoney default templates save location.

On importing templates kmymoney also looks in the default templates
save location for template files which makes it able to reimport
exported templates without any manual interaction like moving file to
a only by root accessable path.

The currently exported template does not have any title or description
which may be entered before exporting through an export options dialog
or wizard.
REVIEW:129107

M  +3    -1    kmymoney/kmymoney.cpp

http://commits.kde.org/kmymoney/229570f64cc6dff6a4882cf81ad17adb347074e2