GNOME Bugzilla – Bug 792157
Cannot create account with different currency
Last modified: 2018-06-30 00:02:33 UTC
I'm using the SQLite3 backend, tested with git master as of 03-01-2018, 2.7.3 and 2.7.2, Arch Linux (built from AUR - gnucash-gtk3-git). When I create a new account in a new file, if I choose a Currency different from the default one, this currency does not keep if I close GnuCash and open it again. When I reopen gnucash the account has no currency at all. If I edit the account the currency field is gone (there is only the label). It's worth noticing that everything works fine until the first time I close gnucash (I think that the memory model is ok, but something is not being saved to the database). I looked in the sqlite file and noticed that the selected currency was not present in the commodity table, only the default currency was there. If I open a file created in an older version of gnucash (2.6) with multiple currencies, all work fine, and I can create new accounts with multiple currencies if the currency I choose is already in the commodity table (but I cannot create account with currencies that are not in the commodity table already). Steps to reproduce: - Open gnucash and create a new file. It doesn't matter if you use trading accounts or not. Choose your default currency and default accounts and save the file with the data format "sqlite3" (my default currency is BRL - Brazilian Real). - Create a new asset account, and when creating the account, select a currency different from the default one (I chose Euro) - Open this account and enter a transaction to a account in the default currency. The "transfer funds" dialog will open and you can choose an exchange rate). - Close gnucash - Reopen gnucash (the last file will open automatically) - the created account will show "0" (zero) balance, with no currency set - If you open the account, you can see the transaction. But if you edit the account, the field for the currency will be gone. - If you open the sqlite3 file in other tool and see the commodity table, there will be only one currency there (the default one). I suppose the currency selected when created the account should be there.
Thank you for your report. I can indeed confirm this. It only fails on sql. The xml backend works fine.
A regression from the C++ conversion.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=792157. Please update any external references or bookmarks.