Can't create a new account

I’m trying to create a new account by clicking “Account → New Account…” in the menu bar. I select an institution and enter the account number. On the next page I enter the account name, set the opening date to today, and set the opening balance to 0. On the “Parent Account” page I don’t select anything because this isn’t a sub account.

When I press Finish I get an error dialogue box that says:

Unable to create account: Unknown parent account ‘’ /home/abuild/rpmbuild/BUILD/kmymoney-5.1.3/kmymoney/mymoney/storage/mymoneystoragemgr.cpp:397

I don’t remember seeing this before (I’ve previously added 4 accounts, but the last time I did this was a few months ago). Is this a bug or am I supposed to select something in the Parent Account page?

Edit to add:
I’m using KMyMoney version 5.1.3 from the openSUSE Tumbleweed 20230806 repo

Every account needs a parent. If you don’t want this to be a subaccount, then choose Asset or Liability (only one should be available on that list, depending on the type of account you are creating. If that works. I’ll consider opening a bug to actually make that the default.

Thanks, that’s worked for me. I had assumed that Asset was just a heading and wasn’t clickable. I think this is partly due to the fact that it has the same appearance as the “Favourites” heading, and it doesn’t make sense to create a subaccount of “Favourites”.

Perhaps it would be better to have a checkbox above the view that says “set this as a subaccount” and then only make the selection box interactive when that checkbox is ticked.

And if you still want to make the headings clickable, then I’d suggest sanitising the input before attempting to create the account so that the user is given a choice to amend the error without having to re-enter all the details (currently the error box shows up after the create account form is closed, so you have to re-enter everything)

Improved in master with this commit. The favorites will not be shown anymore (that was not working properly) and the Next button is only enabled when a parent account is selected. A tooltip on the next button provides a hint about the missing parent account when it is disabled.

The idea of the checkbox does not work because an account must have a parent account.

The idea of the checkbox does not work because an account must have a parent account.

I understand but I still don’t think the concept of setting “Asset” as a parent account is intuitive. What I meant by my suggestion was to remove the Asset/Liability heading from the list of accounts, and create a checkbox instead.

So an unticked checkbox would be the same as clicking Asset/Liability (in the current dialogue box), and a ticked checkbox will make the list become interactive, allowing to choose an actual parent account.

Thank you for the improvement though, it does make it much clearer than it was before.

I also think it’s odd to have to choose a parent account. It’s not how most of us think.
You create a new account. You set its type to current or savings or whatever and that should be it. I’ve had errors where I’ve chosen the “wrong” parent account and the account creation failed. If the underlying code requires each account to have a parent then I’d suggest assigning it by default and offering an advanced option for power users to be able to override it. I think most normal users don’t need subaccounts.

I tried to persuade my wife to move to KMM from her somewhat sprawling spreadsheet but her first experience was to be bitten by the parent account thing. So she’s still in the spreadsheet. I guess first impressions count.

Would it be reasonable to default to making Assets or Liabilities the parent, with a note that it can be changed in the hierarchy, either now or later. That avoids any “no parent” errors, and is not actually any more work to give it a parent of another account.
First time users may not think about using subaccounts, but after a while, it turns out to be very useful for grouping and reporting. If nothing else, you probably shouldn’t be able to leave that screen without setting a parent, rather than causing the error to pop up later.

I agree, first impression counts. Reading the last comments, I think we can change the introductory sentence of this page to mention that this option is meant for experienced users and that one can leave the current default setting (which is Asset or Liability) if you don’t know otherwise. Then we add a checkbox that enables the selection labeled with something like Enable expert mode or similar. Another option could be to simply skip the page if no accounts exist in the respective group (so it won’t show up for a first time user) but then the New Book wizard already allows to create a first account.

Mockup when the page is entered:
image

and with expert mode enabled
image

Wording can certainly be improved, I look forward to suggestions. Thoughts?